From a873530d2524dfd01dabdf69505f9e6159037b2f Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 10:14:23 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20automerge:=20withdraw=20nati?= =?UTF-8?q?ve-queue=20entries=20on=20release=20freeze=20and=20human=20merg?= =?UTF-8?q?e=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .../fixed-native-queue-withdraw-release-human-path.md | 1 + src/pkg/github/automerge/automerge_native_queue.go | 6 +++--- src/pkg/github/automerge/automerge_native_queue_test.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog.d/fixed-native-queue-withdraw-release-human-path.md diff --git a/changelog.d/fixed-native-queue-withdraw-release-human-path.md b/changelog.d/fixed-native-queue-withdraw-release-human-path.md new file mode 100644 index 0000000000..1a1730dbca --- /dev/null +++ b/changelog.d/fixed-native-queue-withdraw-release-human-path.md @@ -0,0 +1 @@ +- Native merge queue withdrawal now also triggers on a release in progress and on a human-merge path, so a Hive-enqueued PR no longer keeps merging through GitHub's queue during a release freeze or after `human_merge_paths` changes (#15517). diff --git a/src/pkg/github/automerge/automerge_native_queue.go b/src/pkg/github/automerge/automerge_native_queue.go index daf9885f8b..b781064595 100644 --- a/src/pkg/github/automerge/automerge_native_queue.go +++ b/src/pkg/github/automerge/automerge_native_queue.go @@ -139,8 +139,8 @@ func ownNativeQueueEntry(e *hgithub.NativeMergeQueueEntry, slug string) bool { // nativeQueueWithdrawReason reports whether a lane's rejection reason means // the PR lost merge eligibility (#15198): a hold, a withdrawn or stale -// approval, changes requested, a paused or disabled repo, or a draft or -// closed PR. Anything else — pending or red checks, behind, a moved head, an +// approval, changes requested, a paused or disabled repo, a draft or closed +// PR, a release in progress, or a human-merge path. Anything else — pending or red checks, behind, a moved head, an // API error, a routing observation — keeps the App's queue entry. func nativeQueueWithdrawReason(reason string) bool { switch reason { @@ -149,7 +149,7 @@ func nativeQueueWithdrawReason(reason string) bool { "queue-approval-missing-head", "queue-approval-head-changed", "self-merge-ban", autoMergeReasonUntrustedMerger, "changes-requested", autoMergeReasonHumanChangesRequested, contributorLaneReasonChangesRequested, nativeQueueReasonPaused, "repo-auto-merge-disabled", relayLaneReasonDisabled, - "draft", "closed": + "draft", "closed", releaseInProgressStatusContext, autoMergeReasonHumanMergePath: return true } return strings.HasPrefix(reason, "label:do-not-merge") || strings.HasPrefix(reason, "excluded-label:") || diff --git a/src/pkg/github/automerge/automerge_native_queue_test.go b/src/pkg/github/automerge/automerge_native_queue_test.go index f24524a2d7..9500385ab7 100644 --- a/src/pkg/github/automerge/automerge_native_queue_test.go +++ b/src/pkg/github/automerge/automerge_native_queue_test.go @@ -137,7 +137,7 @@ func (denyNativeQueueBoundary) Execute(context.Context, effects.Claim, func(cont } func TestNativeQueueGateWithdrawsOnlyHiveEntries(t *testing.T) { - for _, reason := range []string{"held", "label:hold", "label:do-not-merge", "changes-requested", autoMergeReasonHumanChangesRequested, autoMergeReasonReviewGatePrefix + ReviewGateOutcomeChangesRequested, autoMergeReasonNoHiveQueueApproval, "queue-approval-head-changed", "label-removed", nativeQueueReasonPaused, "draft", "closed"} { + for _, reason := range []string{"held", "label:hold", "label:do-not-merge", "changes-requested", autoMergeReasonHumanChangesRequested, autoMergeReasonReviewGatePrefix + ReviewGateOutcomeChangesRequested, autoMergeReasonNoHiveQueueApproval, "queue-approval-head-changed", "label-removed", nativeQueueReasonPaused, "draft", "closed", releaseInProgressStatusContext, autoMergeReasonHumanMergePath} { // A user account named like the App's slug is not the App. for _, actor := range []string{testHiveAppBotLogin, "maintainer", "another-app[bot]", "", botSlug(testHiveAppBotLogin)} { t.Run(reason+"/"+actor, func(t *testing.T) { From 2d55201dd2e1931bab315970f3c6a3a3fa1acd40 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 10:35:45 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20native-merge-queue:=20list?= =?UTF-8?q?=20release-freeze=20and=20human-merge-path=20withdrawal=20trigg?= =?UTF-8?q?ers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/docs/native-merge-queue.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/native-merge-queue.md b/src/docs/native-merge-queue.md index dc7135c314..da666e8d44 100644 --- a/src/docs/native-merge-queue.md +++ b/src/docs/native-merge-queue.md @@ -47,8 +47,8 @@ close an issue. The stage observation carries the reason to the dashboard. When the owning lane rejects a PR because it lost merge eligibility — a hold or `do-not-merge`/`needs-human` label, a removed merger label, a missing, -untrusted or stale queue approval, changes requested, or a draft or closed -PR — Hive rechecks the entry's enqueuer and withdraws it only if it belongs to +untrusted or stale queue approval, changes requested, a draft or closed PR, a +release in progress on the repository, or a human-merge-path hold — Hive rechecks the entry's enqueuer and withdraws it only if it belongs to this App (a `Bot` enqueuer whose login matches the App's slug). Every other reason, including transient refusals such as `behind`, `not-mergeable`, pending checks, a moved head, API read errors, author-routing skips and Hive's own