chore: add PR template and required CI checks (V2-719, V2-720)#185
Open
jacderida wants to merge 1 commit into
Open
chore: add PR template and required CI checks (V2-719, V2-720)#185jacderida wants to merge 1 commit into
jacderida wants to merge 1 commit into
Conversation
Add the standard pull request template (V2-719) and the CI enforcement that makes a linked Linear issue and the template fields required on every PR (V2-720). Part of the release-process extensions; identical across the six crate repos. - .github/PULL_REQUEST_TEMPLATE.md: eight-field template with Risk tier and Semver impact checkboxes, stable headings as grep anchors for the train-manifest verification. - CLAUDE.md: instruct agents to fill the template on PR open. - .github/workflows/pr-checks.yml + .github/scripts/check_pr.py: the linear-link (main + rc-*) and pr-template (main) required status checks. V2-719 V2-720 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds repo-level PR hygiene enforcement for the ant-node project by introducing a standardized PR template and GitHub Actions checks that require a Linear reference and a fully completed template (with main-only enforcement for template completeness).
Changes:
- Added
.github/PULL_REQUEST_TEMPLATE.mdto standardize PR descriptions. - Added
pr-checksGitHub Actions workflow to enforce a Linear link and PR template completeness. - Added a Python checker script (
.github/scripts/check_pr.py) and documented the requirement inCLAUDE.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
CLAUDE.md |
Documents the new requirement to use the standard PR template and notes the CI enforcement checks. |
.github/workflows/pr-checks.yml |
Adds CI jobs intended to enforce “linear-link” and “pr-template” status checks on PRs targeting main / rc-*. |
.github/scripts/check_pr.py |
Implements the Linear reference and PR template validation logic executed by the workflow jobs. |
.github/PULL_REQUEST_TEMPLATE.md |
Introduces the standardized PR template with required sections and checkboxes. |
Comments suppressed due to low confidence (1)
.github/workflows/pr-checks.yml:36
- Same tamper-resistance concern here: ensure the checkout uses the base SHA so the template check script can’t be altered in the PR to force a pass.
steps:
- uses: actions/checkout@v4
- name: Require the PR template fields
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+8
to
+12
| pull_request: | ||
| types: [opened, edited, synchronize, reopened] | ||
| branches: | ||
| - main | ||
| - 'rc-*' |
Comment on lines
+21
to
+23
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Require a linked Linear issue |
Comment on lines
+52
to
+55
| def has_linear_ref(*parts): | ||
| haystack = "\n".join(parts) | ||
| m = LINEAR_URL.search(haystack) or LINEAR_KEY.search(haystack) | ||
| return m.group(0) if m else None |
Comment on lines
+106
to
+118
| for heading in ( | ||
| "linear issue", | ||
| "risk tier", | ||
| "compatibility", | ||
| "semver impact", | ||
| "test evidence", | ||
| "new dependency", | ||
| "adr", | ||
| "mitigation / rollback", | ||
| ): | ||
| if heading not in secs: | ||
| errors.append(f"missing section: ## {heading.title()}") | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear issue
Risk tier
Compatibility
Semver impact
Test evidence
check_pr.pywas exercised locally across its cases: missing Linear referencefails
linear; a key in the title/body/branch passes; a body without thetemplate fails
template; an rc-* base is a no-op pass; a fully-filled templatepasses; and the failure modes (no/duplicate tier or semver box, empty section,
Tier 2/3 without an ADR link) each fail with a specific message. This PR's own
description is validated by the new checks.
New dependency
none
ADR
n/a
Mitigation / rollback
Revert this PR; the template and checks are additive and carry no runtime effect.