ci: KEEP-1304 bring the issue-first gate to parity with keeperhub - #111
Merged
Conversation
This repository ran a first-generation copy of the gate and had drifted from KeeperHub/keeperhub on eight points. The babysit sweeps assume keeperhub behaviour for both repositories, so the drift made the sweep and CI disagree about the same pull request. pr-issue-link now matches keeperhub: the reference is read from the title, the description with HTML comments stripped, and an explicit issue-N branch name, rather than the first #N in the title alone; up to ten candidates are resolved and any accepted one passes; a team pull request satisfies the gate with a Linear ticket in its branch name; failures leave one comment on the pull request, edited in place, instead of writing only to the job log; and synchronize is in the trigger list so a result exists for every head commit. recheck-issue-link is new here. The gate this replaces told contributors to re-run the job by hand when an issue was accepted; that is now automatic. decision-label-check is new here, gating on decision-needed, which the review sweep already applies to pull requests in this repository. EXEMPT_TYPES gains release so one exempt list is correct for both repositories. ISSUES.md is widened to describe what the gate now accepts.
…tten The pull request template and CONTRIBUTING both told contributors the title was the only place a reference counts, and listed three exempt types rather than four. Both now match the gate.
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.
Issue
No GitHub issue. Team change, tracked as KEEP-1304, in the branch name and both commits.
check-issue-linkwill fail on this pull request, and that is the bug being fixed. The gate currently onmainreads a reference only from the title and has no team path, so aci:pull request from a repository branch cannot satisfy it however it is written. Under the gate this pull request installs, the Linear ticket in the branch name passes it. Re-run the check after merge and it goes green.What this changes
This repository ran a first-generation copy of the issue-first gate and had drifted from
KeeperHub/keeperhubon eight points:acceptedpasses#Nonly#Nfailssynchronizetriggerrecheck-issue-link.ymldecision-label-checkdocs chore style releasedocs chore stylepr-issue-link.ymlis replaced with the keeperhub version, adapted only formain.recheck-issue-link.ymlanddecision-label-check.ymlare new here.ISSUES.md,CONTRIBUTING.mdand the pull request template are widened to describe what the gate now accepts, since all three documented title-only referencing and three exempt types.Two things a reader would not predict from the title:
recheck-issue-link.ymlneedsactions: writeto re-run a workflow run. The other two need no new permissions;pr-issue-linkkeepspull-requests: writefor its comment, which is why the file forbids adding a checkout step.recheck-issue-link.ymlremoves, and I quoted it in the new file's header so the reason it exists stays on the record.Scope
One unit. The three workflows and the three documents state one rule, and shipping the gate without the prose would leave
ISSUES.mddescribing a check that no longer behaves that way - the documents are the contract contributors are held to.The real motivation is a disagreement this drift caused:
babysit-prs/queue.shextracts title + description + branch and uses one exempt-type list for both repositories, and says in a comment that the sweep and CI cannot disagree about what counts. Forclithat was false - the review sweep could report a pull request asacceptedorexempt-typethat CI failed. Parity makes the comment true again, which is why the fix belongs here rather than as a special case in the tooling.How it was verified
No Go changed;
go buildandgo testare untouched by this diff.run:body passessh -n.diff.stagingorprodreference leaked into the ported files.pull_request_target/issues/pull_request.decision-neededcomparison was exercised on both branches before porting: a label set containing it blocks, one without passes.Not verified: the
issuestrigger firing here. It cannot be until this is onmain. It was verified end to end in keeperhub, where the same file went from label to green check in nine seconds.Screenshots
Renders nothing.