Repository navigation
π fix: close issues for contributor PRs merged by the hive - #15158
hivecommons-hive[bot] merged 2 commits into
Conversation
Trust the configured hive merge actor for close-on-merge even when the PR author is an external contributor. Resolve missing merge actors from PR details so incomplete cached/list responses do not strand issues on non-default branches. Keep the existing closing evidence and issue gates. Hive-Run: hivecommons#15148 Hive-Plan: close-on-merge-hive-actor Hive-Spec: issue-15148#expected Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Docs currency β one in-scope finding.
src/docs/operator-reference.md:178 (the issues.close_on_merge row) still describes the pre-#15148 rule: "When a hive-authored or trusted-author PR merges and closing keywords or Hive claim metadata show it fixed an open issueβ¦". This PR widens that gate in src/pkg/github/close_on_merge.go:530-539 to also accept a PR whose resolved merge actor (prTerminalMergedBy, src/pkg/github/prclaims.go:1118) is the hive identity, regardless of author β which is the whole point of #15148. The operator reference is the only place the trust rule is spelled out for operators, so it should move with the behavior.
| `issues.close_on_merge` | `true`. | When a PR merges that was authored by Hive or a trusted author, or that Hive itself merged (the merge actor is the hive identity, resolved from `merged_by` or a PR detail lookup when cached metadata omits it; [#15148](https://github.com/hivecommons/hive/issues/15148)), and closing keywords or Hive claim metadata show it fixed an open issue, Hive comments `Fixed by #<pr> (merged <sha>). Closing. Reply /reopen if the problem persists.` and closes the issue as `completed`. Issues labelled `needs-reporter-confirmation`, `epic`, or `needs-human` stay open: Hive comments that the fix merged, adds `hive/likely-done`, and waits for `/fixed` or more instructions. Both comments carry `<!-- hive-close-on-merge -->`, Hive's already-handled marker: an issue with that comment is never closed on merge again, so `/reopen` after a Hive close sticks. An issue reopened after the PR merged stays open even when GitHub's closing keyword, not Hive, closed it: before closing, Hive reads the issue timeline since that PR's merge, and a `reopened` event by anyone but Hive (including `github-actions[bot]` from `/reopen`) skips the close and posts one comment carrying `<!-- hive-reopened-after-merge pr=<pr> -->`, so later sweeps skip that PR without rereading the timeline. The marker is per PR: a different PR that merges after the reopen can still close the issue. If the timeline cannot be read, Hive leaves the issue open and retries on the next sweep. |
(Only the first clause changes; the rest of the row is reproduced verbatim so the suggestion applies cleanly to line 178.)
Changelog fragment name/category (changelog.d/fixed-15148-close-hive-merged-pr.md) and wording match the diff; src/docs/webhooks.md:77-78 ("uses the scheduled sweep's identity/trusted-author policy") remains accurate since it defers to that policy.
β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@thatguywob this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
|
Merged by hive contributor-lane auto-merge: CI green for β₯30m, reviewer verdict approve, claim by @thatguywob on #15148 verified. |
Fixes #15148
Contributor PRs merged by the hive can leave their fixing issues open on non-default branches because GitHub does not apply closing keywords there and close-on-merge previously trusted only the PR author.
Accept the configured hive identity as the merge actor as well as the author. Resolve an omitted merge actor through the existing terminal-PR detail lookup, including when cached PR metadata is incomplete. The usual claim evidence, reporter confirmation, reopen, and closure safeguards still apply; successful closure removes stage labels.
Regression coverage includes external PRs merged into
v6, missing cached merge actors, rejection of other/unknown merge actors, confirmation gating, unmerged PRs, and backfill stage-label cleanup. Added a changelog fragment.Validation:
gofmt -lon changed Go files andgit diff --checkpassed. Tests were not run locally, as required by AGENTS.md; CI provides the test verdict.β hive: backend=codex
π Hive Agent:
contributor| SHA:70cfe1db8