fix(workflow): use release-bot token for cross-repo API calls#7843
Merged
Conversation
Two bugs fixed: 1. sentry-internal-app is not installed on all getsentry repos, so the poller got 404s for sentry-xbox, sentry-playstation, sentry-switch, service-registry, etc. Use the sentry-release-bot token for the cross-repo calls (check-suites, status, check-runs) since it has access to all getsentry repos (same app used by publish.yml). 2. gh api failures were silently passing through as the error JSON string when using --jq + 2>/dev/null. This caused CI status checks to appear successful when the API call actually failed, stranding issues in ci-pending forever. Now we check exit code explicitly via a helper function. Keeps sentry-internal-app for label changes on this repo (since those events trigger publish.yml — GITHUB_TOKEN events are suppressed).
Replace gh_api_release ... || true with explicit if/then pattern so the error handling is not silently swallowed. Failures are still non-fatal (fall back to issue SHA) but the intent is clearer and the helper warning messages propagate correctly.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 06103fd. Configure here.
…nt error handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The poller was failing silently on repos where sentry-internal-app is not installed (sentry-xbox, sentry-playstation, sentry-switch, service-registry, etc.), causing publish issues to be stranded in
ci-pendingindefinitely — even when CI had actually finished.Failing run: https://github.com/getsentry/publish/actions/runs/24555234527/job/71789954013
The logs show the root cause:
Two bugs
1. Missing repo access
sentry-internal-app isn't installed on all private getsentry repos. Switch cross-repo API calls (check-suites, commit status, check-runs) to the sentry-release-bot token — the same app used by
publish.ymlwithowner: getsentrywhich has access to all org repos.2. Error leak through
--jqpipelinegh api ... --jq '.state' 2>/dev/null || echo "error"silently passes the error JSON through as the value when the jq filter fails on a 404 response. Now we check the exit code explicitly via agh_api_releasehelper that captures stdout+stderr and propagates failure.Cost
No change — same API calls, different token.
sentry-internal-appstays in charge of label changes on this repo (needed to triggerpublish.yml).