fix(workflow): resolve release branch HEAD instead of using stale issue SHA - #7772
Merged
Conversation
…ue SHA When a bot (e.g., auto-fix, skill regeneration) pushes a new commit to the release branch after the publish issue is created, the "View check runs" SHA in the issue body becomes stale. The poller would check CI status on the old commit and never see the new CI results. Fix: use the Check Suites API to discover the branch name from the original SHA, then resolve the branch HEAD. If it differs from the issue SHA, update the issue body so the link stays accurate for humans and subsequent poller runs. Fallback chain: branch HEAD → issue body SHA (for repos where the check suites API returns no results).
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.
Summary
When a bot (e.g., auto-fix, skill regeneration) pushes a new commit to the release branch after the publish issue is created, the "View check runs" SHA in the issue body becomes stale. The CI poller checks status on the old commit and never sees the new CI results.
Failing run: https://github.com/getsentry/publish/actions/runs/24264032659/job/70854676310
Fix
Use the Check Suites API to discover the branch name from the original SHA (
check_suites[0].head_branch), then resolve the branch HEAD viagit/ref/heads/{branch}. This avoids assuming any branch naming convention.If the branch HEAD differs from the issue SHA, update the issue body so the "View check runs" link stays accurate for humans and subsequent poller runs.
Fallback: if check suites return no results, use the issue body SHA as before.