Skip to content

chore(workflow): require issue-first pull requests - #2

Merged
abruption merged 1 commit into
mainfrom
chore/1-main-pr-policy
Nov 13, 2026
Merged

abruption merged 1 commit into
mainfrom
chore/1-main-pr-policy

Conversation

@abruption

Copy link
Copy Markdown
Owner

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 verify and Issue-first PR checks, 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 #n on 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

  • npm run typecheck
  • npm run build (Worker dry-run only)
  • npm test: 125 passed
  • git diff --check
  • Active main ruleset verified with GitHub API; current user cannot bypass.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T02:38:46.755460Z ab1c709 PR opened
🔒 Security Review ✅ Completed 2026-11-13T02:39:26.101059Z ab1c709 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption
abruption merged commit ff33014 into main Nov 13, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +4 to +5
pull_request:
types: [opened, edited, synchronize, reopened, ready_for_review]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

chore(workflow): require issue-linked pull requests for main

1 participant