Skip to content

fix(workflow): resolve release branch HEAD instead of using stale issue SHA - #7772

Merged
BYK merged 1 commit into
mainfrom
fix/ci-poller-stale-sha
Apr 10, 2026
Merged

fix(workflow): resolve release branch HEAD instead of using stale issue SHA#7772
BYK merged 1 commit into
mainfrom
fix/ci-poller-stale-sha

Conversation

@BYK

@BYK BYK commented Apr 10, 2026

Copy link
Copy Markdown
Member

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 via git/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.

…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).
@BYK
BYK marked this pull request as ready for review April 10, 2026 21:20
@BYK
BYK requested a review from a team as a code owner April 10, 2026 21:20
@BYK
BYK merged commit bcaa437 into main Apr 10, 2026
10 checks passed
@BYK
BYK deleted the fix/ci-poller-stale-sha branch April 10, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant