Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,3 @@ jobs:
- name: the Stage-B schedules loader's tests
run: uv run --frozen pytest
working-directory: tools/servicetag-schedules
hygiene:
if: github.event_name == 'pull_request'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ github.event.pull_request.head.sha }} # the pull request's own tip, not the merge ref
fetch-depth: 0 # the whole range, and origin/<base branch>
persist-credentials: false # this job needs no git credentials after the checkout
- name: the pull request's own commits follow CLAUDE.md
env:
BASE: origin/${{ github.base_ref }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: bash tools/check-commit-hygiene.sh "$BASE" "$HEAD_SHA"
20 changes: 20 additions & 0 deletions .github/workflows/hygiene.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: hygiene
# Its own workflow, on pull requests only, so a pull request's head carries exactly one check run
# named "hygiene": the ruleset "master: hygiene required" waits on that name, and a job skipped by
# an `if:` inside the push-triggered ci workflow would also count as passed.
on:
pull_request:
jobs:
hygiene:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ github.event.pull_request.head.sha }} # the pull request's own tip, not the merge ref
fetch-depth: 0 # the whole range, and origin/<base branch>
persist-credentials: false # this job needs no git credentials after the checkout
- name: the pull request's own commits follow CLAUDE.md
env:
BASE: origin/${{ github.base_ref }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: bash tools/check-commit-hygiene.sh "$BASE" "$HEAD_SHA"
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ commit or pull request attribution. Product design lives in `docs/`, not here.
- Name the branch for the work, `fix-…` or `issue-123-…`. Never start it with a tool's name.
- Merge with a merge commit whose subject carries no tool-named branch. Never squash or rebase
away the owner's history.
- CI's `hygiene` job runs `tools/check-commit-hygiene.sh` over the pull request's own commits. Run
- The `hygiene` workflow runs `tools/check-commit-hygiene.sh` over the pull request's own commits and
master requires it green (ruleset "master: hygiene required"; repository admins can bypass). Run
it before pushing: `bash tools/check-commit-hygiene.sh origin/master HEAD`.

## The gates CI cannot run
Expand Down
2 changes: 1 addition & 1 deletion docs/release-proofs.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ prints the three activities sorted and `other 0 []`; a fourth exported component

Each prints nothing, or the count stated. The author, attribution and empty-body lines, and the
three content greps, are now also enforced on every pull request, over its own commits, by
`tools/check-commit-hygiene.sh` (CI's `hygiene` job); the controller still runs them all here.
`tools/check-commit-hygiene.sh` (the `hygiene` workflow, required on master); the controller still runs them all here.

- no e-mail in added lines: `git diff <base>..HEAD | grep -nE '^\+.*[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}'` (fixture URLs carry none)
- no home path: `git diff <base>..HEAD | grep -nE '^\+.*/hom[e]/[a-z]'`
Expand Down