fix(required-gate): ignore unrelated label changes#58
Conversation
Remove broad labeled and unlabeled pull_request triggers from the required-gate caller example so labels like no-changelog do not restart the stable branch-protection gate. Document the ci:full rerun tradeoff and add a regression assertion.\n\nCloses #57
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e721d88c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # If you add the label after the latest gate run, rerun the workflow, | ||
| # push a new commit, or use another normal PR event to refresh the gate. |
There was a problem hiding this comment.
Fetch current labels before suggesting reruns
When ci:full is added after the latest gate run and a maintainer follows this new instruction to rerun, the reusable workflow still builds labels from context.payload.pull_request in .github/workflows/repo-required-gate.yml, which is the original PR event payload rather than a fresh label lookup. GitHub re-runs use the original event's SHA/ref (docs), so the new label is not reliably present and the forced-full lane will not run; only a new PR event such as a push/edit refreshes it. Either fetch current issue labels during classification or remove rerun the workflow from this workaround.
Useful? React with 👍 / 👎.
Summary
labeled/unlabeledtriggers from the required-gate caller example.ci:fullis honored when the gate runs, but adding it after the latest run needs a rerun or normal PR event.Closes #57
Verification
npm testactionlint examples/repo-required-gate.yml .github/workflows/repo-required-gate.ymlgit diff --checkVerification Notes
npm testpassed 6 files / 122 tests.actionlintreturned no diagnostics for the changed caller example and reusable gate workflow.git diff --checkreturned no whitespace errors.