Skip to content
Snippets Groups Projects
Commit 44df1b98 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: demo posting PR comment

parent f9c81056
No related tags found
1 merge request!3feat: demo posting PR comment
Pipeline #66797 passed
......@@ -47,6 +47,29 @@ stages:
done ;
fi
.report:
image: curlimages/curl:latest
before_script: []
script:
- |
if [ -n "${GITHUB_PR}" ] ; then
BODY=$(
echo "<details><summary>geoviewer</summary>" ;
for config in ${DETECTOR_CONFIG//,/ } ; do
url=${TARGET_URL/%config%/${config}} ;
echo "- [$config]($url)" ;
done ;
echo "</details>" ;
) ;
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${GITHUB_PR}/comments" \
-d '{"body":"'"${BODY}"'"}' ;
fi
geoviewer:pending:
stage: status-pending
extends: .status
......@@ -105,10 +128,8 @@ convert:
report:
stage: finish
extends: .report
needs: ["convert"]
script:
- echo "It was a success!"
allow_failure: true
geoviewer:success:
stage: status-report
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment