Repository navigation
head gate: review run log tells a skipped branch name from odd fields, counts the listing (#651) - #657
Merged
Conversation
…, counts the listing (#651) - A head branch git allows but the gate does not look up (a no-break or zero-width space, an emoji joined by a zero-width joiner, longer than 255) now gets a plain line that says so, not the warning that blames GitHub's fields. The warning stays for missing or malformed sha, repository or branch (a branch with a control character git refuses), and names a deleted fork as the one known harmless cause. - "no open pull request has the head" says how many open pull requests GitHub listed on that branch, so setup step 8 can tell a wrong filter (none listed) from a wrong head sha or repository (some listed). - Release notes: the trigger's Upgrade needs a pin at ci/v15 or later (not "a release that has this entry"); the refused pin is ci/v14 or before; the #379 warning is after ci/v20 (that tag does not have it). - The docs test checks "is refused" too. Part of #651. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #651 (the five minors from the two #650 reviews). The live check stays open in #651: it needs a project that has copied the review trigger and caller to its default branch, and none has yet.
The five minors
head=owner:branchfilter is not GitHub's. If some are listed, the head sha or head repository differs. It stays a plain line: a review on a PR that closed meanwhile is normal, and a warning there would be noise.ci/v14or before) is refused". Rewording it to "fails" is now killed.ci/v15or later", and names the refused older pin asci/v14or before. One correction on the side: the head gate review trigger: #375 follow-ups (two PRs one branch, docs, caller if, test gap, live check) #379 sentence said "Afterci/v19", butci/v20does not have the warning either (checked bygit show ci/v20:…/head_gate.py). It now says "Afterci/v20". Step 8 also says that an older pin logs the warning as a plain line (lens A's nit).Behaviour that did not change
Every return value, exit code,
prsoutput and refusal is the same as before. Only log lines change. Nothing is judged that was skipped before, and nothing skipped that was judged. Long and non-printable branches still read nothing. The new log text is constant except for the count, so a run field cannot inject an annotation.Tests (red first)
origin/main's code and docs:head_gate.test.pygives 22 failing subtests across the three new or changed tests.fork-head-gate-workflow.test.pygives 4 failed checks.head_gate.test.py108 OK,fork-head-gate-workflow.test.pyall passed,fork-contracts.test.pyall passed.BRANCH_MAXdropped,isprintabledropped, the deleted-fork text dropped, "none with this head" dropped, and the plain-branch case falling through to the listing.Nonesha, repository and branch) is tested, and so are an empty listing and a listing with one number twice.General vs project
All of this is general head-check gate code and docs, with no project facts. The live check is still project work: the first project that copies the trigger follows setup step 8 and records the result in #651.
🤖 Generated with Claude Code