Skip to content

SRE 696: Fix stale approvals reusable workflow checkout for PR callers#63

Merged
lunelson merged 1 commit into
mainfrom
ln/sre-696-fix-stale-approvals-checkout-source
May 19, 2026
Merged

SRE 696: Fix stale approvals reusable workflow checkout for PR callers#63
lunelson merged 1 commit into
mainfrom
ln/sre-696-fix-stale-approvals-checkout-source

Conversation

@lunelson
Copy link
Copy Markdown
Collaborator

Summary

  • Always checkout the shared action from hashintel/.github instead of the PR head repository
  • Remove the split checkout path added in Avoid dismissing approvals on restacks alone #58 for pull_request events
  • Always resolve and use the reusable workflow ref as the checkout ref

Why

PR #58 made pull_request events checkout the PR head repository so changes to .github/actions/dismiss-stale-approvals could 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/.github regardless of which repository triggered the PR event. Now that this branch lives in hashintel/.github rather than a fork, the OIDC step can run on pull_request events and provide the exact workflow ref for checkout.

Linear

  • SRE-696

Tests

  • .github/actions/dismiss-stale-approvals/self-test.sh

@cursor
Copy link
Copy Markdown

cursor Bot commented May 19, 2026

PR Summary

Low Risk
Low risk: this only adjusts the reusable workflow’s checkout logic for a composite action, with no product code changes; main risk is mis-resolving the workflow ref and breaking the CI job.

Overview
Ensures the stale-approvals reusable workflow always checks out the dismiss-stale-approvals action from hashintel/.github (using the resolved reusable-workflow ref), instead of conditionally checking out the PR head repo on pull_request events.

Removes the split pull_request vs non-pull_request checkout paths so self-test.sh and the action are consistently sourced from the shared repository across callers.

Reviewed by Cursor Bugbot for commit fca9f5c. Bugbot is set up for automated code reviews on this repo. Configure here.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 19, 2026

🤖 Augment PR Summary

Summary: Ensures the stale-approvals reusable workflow always checks out the shared dismiss-stale-approvals action from hashintel/.github.
Change: Removes the pull_request-specific checkout path and consistently resolves/uses the reusable-workflow ref for checkout.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread .github/workflows/preflight-stale-approvals.yml
@lunelson lunelson added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 8d02182 May 19, 2026
8 checks passed
@lunelson lunelson deleted the ln/sre-696-fix-stale-approvals-checkout-source branch May 19, 2026 18:31
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.

2 participants