SRE 696: Fix stale approvals reusable workflow checkout for PR callers#62
SRE 696: Fix stale approvals reusable workflow checkout for PR callers#62lunelson wants to merge 1 commit into
Conversation
PR SummaryLow Risk Overview Adds a fallback checkout ref of Reviewed by Cursor Bugbot for commit ffd712f. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Updates the 🤖 Was this summary useful? React with 👍 or 👎 |
2d0d442 to
ffd712f
Compare
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 ffd712f. Configure here.
| with: | ||
| repository: hashintel/.github | ||
| ref: ${{ steps.workflow-ref.outputs.ref }} | ||
| ref: ${{ steps.workflow-ref.outputs.ref || 'main' }} |
There was a problem hiding this comment.
Checkout uses main on pull_request
Medium Severity
On every pull_request run (including reusable workflows invoked from another repo’s PR), Resolve reusable workflow ref is skipped and checkout uses main on hashintel/.github. Callers pinned to another ref no longer get that ref, and hashintel/.github PRs no longer exercise the PR’s action changes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ffd712f. Configure here.
There was a problem hiding this comment.
If we don't make the workflow-ref job conditional, we can use the output all the time I think. It should work all the time.
|
Superseded by #63, which uses an origin branch now that I have access to push to hashintel/.github. |


Summary
hashintel/.githubinstead of the PR head repositorypull_requesteventsmainas thepull_requestfallbackWhy
PR #58 made
pull_requestevents checkout the PR head repository so changes to.github/actions/dismiss-stale-approvalscould be self-tested before merge. That breaks callers in other repositories because their PR head checkout does not contain.github/actions/dismiss-stale-approvals/self-test.sh.The reusable workflow should run the actual shared action from
hashintel/.githubregardless of which repository triggered the PR event.Linear
Tests
.github/actions/dismiss-stale-approvals/self-test.sh