Files
AnyPS5/.github/workflows/conventions.yml
T
harisibrar1andClaude Opus 5.5 0c7d25c3d1 ci(conventions): check pull requests with the current base branch rules
The workflow checked out pull_request.base.sha, the base recorded when the
pull request was opened, and ran that revision's check_conventions.py. A rule
merged after a pull request was opened never ran on it: #7005 added
APS5_NO_WGI without an ENVIRONMENT.md row and passed with the checker of
07e741481, which had no env-reference rule.

Check out the current tip of the base branch and pass it as --base; the
checker already diffs from the merge base, so only the pull request's own
changes are checked. A name documented on the base branch after the branch
point now counts as documented unless the pull request removes its row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 00:50:41 -04:00

32 lines
903 B
YAML

name: Conventions
on:
pull_request_target:
types: [opened, synchronize, reopened, edited]
permissions:
contents: read
concurrency:
group: conventions-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
conventions:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 0
persist-credentials: false
- name: Fetch pull request objects without checking out its code
env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: git fetch --no-tags origin "$HEAD_SHA"
- name: Check conventions with the current base branch script
env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: python3 -I tools/check_conventions.py --base HEAD --head "$HEAD_SHA"