hooks: Tell Sentry the explicit commit range.

This is necessary if one has different deployments (with different
commit ranges) using the same projects.

See https://docs.sentry.io/product/releases/associate-commits/#using-the-cli
for the API of the `sentry-cli` tool.
This commit is contained in:
Alex Vandiver 2023-06-14 01:49:08 +00:00 committed by Tim Abbott
parent 7657cb4a0f
commit edfc911649
1 changed files with 2 additions and 1 deletions

View File

@ -24,8 +24,9 @@ curl "https://sentry.io/api/0/organizations/$sentry_org/releases/" \
merge_base="${ZULIP_NEW_MERGE_BASE_COMMIT:-}"
if [ -n "$merge_base" ]; then
old_merge_base="$ZULIP_OLD_MERGE_BASE_COMMIT"
echo "sentry: Setting commit range based on merge-base to upstream of $merge_base"
sentry-cli releases --org="$sentry_org" set-commits "$sentry_release" --commit="zulip/zulip@$merge_base"
sentry-cli releases --org="$sentry_org" set-commits "$sentry_release" --commit="zulip/zulip@$old_merge_base..$merge_base"
fi
if [ -n "$sentry_frontend_project" ]; then