-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#1065] Fixed failing GitHub notifications. #1361
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1361 +/- ##
==========================================
- Coverage 3.19% 3.18% -0.01%
==========================================
Files 41 41
Lines 3038 3046 +8
==========================================
Hits 97 97
- Misses 2941 2949 +8 ☔ View full report in Codecov by Sentry. |
@@ -92,10 +92,11 @@ tasks: | |||
DREVOPS_NOTIFY_EVENT=post_deployment \ | |||
DREVOPS_NOTIFY_PROJECT=$LAGOON_PROJECT \ | |||
DREVOPS_NOTIFY_ENVIRONMENT_URL=$LAGOON_ROUTE \ | |||
./scripts/drevops/notify.sh | |||
./scripts/drevops/notify.sh || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not fail the deployment if the notifications fail
@@ -118,7 +118,7 @@ load _helper.bash | |||
declare -a STEPS=( | |||
"Started dispatching notifications." | |||
"Started GitHub notification for pre_deployment event." | |||
"@curl -X POST -H Authorization: token token12345 -H Accept: application/vnd.github.v3+json -s https://api.github.com/repos/myorg/myrepo/deployments -d {\"ref\":\"mybranch\", \"environment\": \"PR\", \"auto_merge\": false} # {\"id\": \"${app_id}\", \"othervar\": \"54321\"}" | |||
"@curl -X POST -H Authorization: token token12345 -H Accept: application/vnd.github.v3+json -s https://api.github.com/repos/myorg/myrepo/deployments -d {\"ref\":\"existingbranch\", \"environment\": \"PR\", \"auto_merge\": false} # {\"id\": \"${app_id}\", \"othervar\": \"54321\"}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replacing to use existingbranch
and nonexistingbranch
Closes #1065
The root cause was related to the fact that a Git ref was used instead of a branch name for PRs.
From https://docs.github.com/en/rest/deployments/deployments?apiVersion=2022-11-28
The script was using
DREVOPS_NOTIFY_REF
instead ofDREVOPS_NOTIFY_BRANCH
for PRs. This PR fixes that.It also adds 2 more changes:
With the now additionally expanded messages, this should provide enough information