Repository navigation
ci(pr-automation): skip semver for GitHub-only changes - #2069
Benoît Cortier (CBenoit) wants to merge 1 commit into
Conversation
Record Cargo API compatibility as not applicable when the immutable exact base/head diff is nonempty and contains only `.github/**` paths. Bind the exemption to both SHAs through classification publication, while every other diff keeps the existing fail-closed cargo-semver-checks path.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Published classification checks remain head-only and can reuse a stale exemption after the PR base advances.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds a .github/**-only exemption from Cargo semver checks while binding the in-flight classification to exact base/head SHAs.
Changes:
- Detects nonempty GitHub-only diffs and skips semver installation/execution.
- Propagates and validates the base SHA during classification publication.
- Adds tests and documentation for the exemption.
Protocol review was skipped because these CI-only changes do not affect RDP behavior.
| File | Description |
|---|---|
.github/workflows/pr-automation.yml |
Detects eligible diffs and propagates base SHA. |
.github/workflows/pr-automation.intent.md |
Records the exemption invariant. |
.github/pr-automation/write-state.js |
Checks base freshness before mutations. |
.github/pr-automation/resolve-state.js |
Accepts base-bound not-applicable status. |
.github/pr-automation/current-head.js |
Adds base SHA validation. |
.github/pr-automation/automation.test.js |
Tests exemption and stale-base handling. |
.github/PR_AUTOMATION.md |
Documents skipped semver execution. |
| ]; | ||
| return { | ||
| ok: true, mode: "classification", expectedSha, forced, labelSets, addLabels, comments, auditComments, | ||
| ...(semverStatus === "not-applicable" ? { expectedBaseSha } : {}), |
| github, owner, repo, pullNumber, expectedHeadSha, expectedBaseSha, | ||
| }) { | ||
| const data = await readPullRequest({ github, owner, repo, pullNumber }); | ||
| if (data.state !== "open" || data.head?.sha !== expectedHeadSha) { | ||
| if (data.state !== "open" || data.head?.sha !== expectedHeadSha || | ||
| (expectedBaseSha !== undefined && data.base?.sha !== expectedBaseSha)) { |
|
Update: no rebase needed anymore. picky-krb 0.12.5 was yanked from crates.io (re-released as 0.13.0), so the API check builds again without changes to this branch. PR automation has been re-run here and passes. |
|
This pull request may overlap with #2071. Both pull requests modify the semver compatibility job in .github/workflows/pr-automation.yml and its surrounding state plumbing (resolve-state.js, write-state.js, intent docs, and automation tests). PR 2071 reworked how cargo-semver-checks runs with locked dependencies; this PR adds a skip path for GitHub-only diffs and base-SHA binding in the same job and scripts, so they currently share the semver-job and automation-state scope. This notice is advisory only. Automated review continues as usual, and how these pull requests relate is for maintainers and authors to decide. Note LLM-assisted content (no human feedback). |


Record Cargo API compatibility as not applicable when the immutable exact base/head diff is nonempty and contains only
.github/**paths.Bind the exemption to both SHAs through classification publication, while every other diff keeps the existing fail-closed cargo-semver-checks path.