Repository navigation
chore(workflow): require issue-first pull requests - #2
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab1c709488
ℹ️ 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".
| pull_request: | ||
| types: [opened, edited, synchronize, reopened, ready_for_review] |
There was a problem hiding this comment.
Run the policy check from a trusted workflow revision
For a PR that modifies .github/workflows/pr-policy.yml, the pull_request trigger executes the PR's modified workflow, so the author can bypass issue validation by adding if: false to the validation step while retaining the successful Issue-first PR job. This defeats the new required policy check even when the PR has no linked issue. GitHub documents that pull_request runs in the merge-commit context, whereas pull_request_target uses the base repository's default branch. Run this metadata-only check from that trusted context, retaining read-only permissions and avoiding execution of PR code.
Useful? React with 👍 / 👎.
Closes #1
Problem and result
Main previously accepted direct pushes and repository work had no required issue linkage. An active ruleset now requires a PR, passing
verifyandIssue-first PRchecks, and resolved review conversations, with no bypass actors; force pushes and branch deletion are blocked.The new policy checks GitHub metadata for an open repository Issue created before the PR. Every PR must include
Closes #non its own line; there are no bot exceptions. The PR template records the Issue-first workflow. Tests cover missing links, later or closed Issues, PR references, malformed dates and API failures.AGENTS.md remains on this machine with expanded project purpose and development guidance. It is removed from Git tracking and ignored as requested; the deletion here does not delete the local file or rewrite history.
Validation
Limits
GitHub can verify that the Issue predates PR creation; the local guidance also requires creating the Issue before implementation. The ruleset is already active; the new policy workflow and template take effect on main when this PR is merged.