Skip to content

fix(policy)!: check pull requests by title and added content - #9

Merged
showxu merged 2 commits into
masterfrom
fix/pr-policy-scope
Oct 27, 2026
Merged

showxu merged 2 commits into
masterfrom
fix/pr-policy-scope

Conversation

@showxu

@showxu showxu commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Pull-request policy now matches the organization standard: it checks the title, added content and added or modified paths. Members squash-merge with the PR title as the subject and an empty body, so pull-request commits never reach the default branch.

What changes

  • Pull requests no longer check individual commits. Merge commits that update a pull request pass, and so do external contributors' commits, whatever their subject, trailers, committer or signature.
  • Each new default-branch commit is still checked for:
    • GitHub verification;
    • a GitHub or owner committer;
    • a Conventional Commit subject;
    • no attribution trailer.
      The original author is not restricted.
  • Manual dispatch checks only the selected commit.
  • Breaking: the dependabot-exception input is removed. It existed only for pull-request commit checks, and default-branch squash commits carry no trailers. This repository was the only caller passing it.
  • README states the squash-only caller requirement and what each event checks. CHANGELOG records both changes under ## Unreleased. No version is released; members move their pins to the merge commit.

Validation

  • python3 -m unittest discover -s tests: 140 tests pass. actionlint passes.
  • On the previous script, the new pull-request test fails. It covers a Git default merge commit and an external, unsigned commit carrying trailers, and it asserts that an added-line finding is still reported.
  • The default-branch push test reports a foreign committer and an unverified commit, and passes commits authored by a contributor.
  • Independent reviews: one for correctness, one for design and docs. Their findings are addressed in the second commit. A pre-existing gap stays out of scope: when the previous tip of a force-pushed default branch is missing, policy checks only the new head.
  • This repository's own policy check runs the candidate.

Members squash-merge with the PR title as the subject and an empty body, so
pull-request commits never reach the default branch. Pull-request policy now
checks the title, added lines and paths only; commit verification, committer
identity, subjects and attribution trailers stay on default-branch pushes and
dispatch. Merge commits that update a pull request and external contributors'
commits pass, as the organization standard describes.
Pull requests are no longer checked commit by commit, and default-branch
squash commits have empty bodies, so the Dependabot signoff exception no
longer applies anywhere. Remove the input, its environment variable, the
authentication helper and its tests.

README and CHANGELOG state that manual dispatch checks only the selected
commit, and that callers must squash-merge with the PR title and an empty
body. Tests assert added-line findings on pull requests and that the original
author is not restricted on default-branch pushes.
@showxu showxu changed the title fix(policy): check pull requests by title and added content fix(policy)!: check pull requests by title and added content Oct 27, 2026
@showxu
showxu marked this pull request as ready for review October 27, 2026 07:57
@showxu
showxu merged commit bfefb33 into master Oct 27, 2026
17 checks passed
@showxu
showxu deleted the fix/pr-policy-scope branch October 27, 2026 07:57
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.

1 participant