pr-merge: don't tell the caller to just un-draft a PR that isn't theirs
This commit is contained in:
parent
dd5ccb5ce7
commit
b4e56b964f
1 changed files with 5 additions and 1 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Reference in a new issue