Skip to content

ci: PR issue-linkage gate accepts only closing keywords, so multi-batch PRs cannot pass without wrongly closing the issue #12995

Description

@mrveiss

Surfaced on PR #12994 and, identically, on PR #12991 — both batches of #12979.

Problem

The Check PR links to its issue gate accepts only closing keywords:

##[error]PR body has no 'Resolves/Closes/Fixes #N' linkage.
##[error]Add 'Closes #12979' to the PR body.

It derives the expected issue number from the branch name (issue-12979-integrations-pool → 12979) and then demands a keyword that closes that issue on merge.

That leaves no way to express the common case of an issue delivered across several PRs. #12979 is the current example: 134 raw aiohttp.ClientSession( constructions, being converted in reviewable batches (#12982 pilot, #12991 utils, #12994 integrations), with ~98 still remaining in autobot-backend/ alone. Each batch legitimately advances the issue; none of them closes it.

The gate therefore forces a choice between two wrong outcomes:

  1. Add Closes #12979 — which contradicts the closure rule that partial delivery never closes an issue, and would auto-close a live issue with most of its work outstanding.
  2. Leave it off and ship with a red check — which is what both perf(http): route utils/ health and model probes through the shared pool (#12979) #12991 and perf(http): route CI/CD and VCS integrations through the shared pool (#12979) #12994 did.

Option 2 is the lesser evil, and the check is not in the required set for Dev_new_gui, so it does not block merge. But a permanently-red advisory check on every batch PR is noise that trains reviewers to ignore the gate, which defeats its purpose for the PRs where the linkage genuinely is missing.

Evidence

$ gh pr checks 12991 | grep "links to its issue"
Check PR links to its issue	fail	3s

$ gh pr checks 12994 | grep "links to its issue"
Check PR links to its issue	fail	2s

Both PR bodies reference #12979 repeatedly — in the title, in the thinking path, and in the verification section. The gate does not count any of it, because none of it uses a closing keyword.

Suggested fix

Accept a non-closing linkage keyword as satisfying the gate. Refs #N, Part of #N, or Advances #N all express "this PR belongs to issue N but does not complete it", and GitHub already renders them as a cross-reference without closing.

The gate's real intent — every PR must be traceable to an issue — is fully served by that. Requiring specifically a closing keyword conflates traceability with completion, and only the first of those is a property every PR should have.

Minimal change: extend the accepted pattern from (Resolves|Closes|Fixes) to also match (Refs|Part of|Advances), keeping the branch-derived issue number check unchanged so the linkage still has to point at the right issue.

Verification

Re-run the gate against PR #12994 with Refs #12979 in the body and confirm it passes, then against a PR body with no issue reference at all and confirm it still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions