From b4e56b964f5c17542cb20c7555ce805be5826fd3 Mon Sep 17 00:00:00 2001 From: damocles Date: Thu, 13 Aug 2026 15:14:34 +0200 Subject: [PATCH] pr-merge: don't tell the caller to just un-draft a PR that isn't theirs --- hive-forge/src/verbs/pr_merge.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hive-forge/src/verbs/pr_merge.rs b/hive-forge/src/verbs/pr_merge.rs index ff3f886a..1f450b4c 100644 --- a/hive-forge/src/verbs/pr_merge.rs +++ b/hive-forge/src/verbs/pr_merge.rs @@ -134,8 +134,12 @@ fn check_ready(client: &Client, repo: &str, number: u64, pull: &PullRequest) -> // others (rebasing a draft does nothing). Only name the // cause when the API actually confirms it (draft); otherwise report // the bare observation and let `pr-status` be consulted for detail. + // Report the confirmed cause without prescribing the fix — a draft + // can be a deliberate signal (from the author, or the operator) + // rather than an oversight, so don't tell the caller to just + // undraft it if it isn't theirs to undraft. Some(false) if pull.draft.unwrap_or(false) => bail!( - "pr-merge: PR #{number} is a draft, not mergeable. Mark it ready for review, or pass --force." + "pr-merge: PR #{number} is a draft, not mergeable. Pass --force, or check with whoever set draft before un-drafting it." ), Some(false) => bail!( "pr-merge: PR #{number} is not mergeable. Check `pr-status --pr {number}` for detail, or pass --force."