chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
A pull held for a review no longer tells its author to approve it
.changeset/own-pull-approval.mdnew+9−0
| @@ -0,0 +1,9 @@ | ||
--- | ||
default: patch | ||
--- | ||
| ||
# A pull held for a review no longer tells its author to approve it | ||
| ||
The message for a pull that lacks a review now says that anyone but its | ||
author who may write can approve it, and that the owner merges past it | ||
with `--force`, their own pull too. | ||
crates/knotless/src/approvals.rs+2−2
| @@ -316,9 +316,9 @@ pub async fn changed(git: &Git, base: &str, head: &str) -> Result<Vec<String>> { | ||
| ||
/// How a refusal ([`refusal`]) starts to say what to do about it, for a | ||
/// client that says it in its own words to find. | ||
pub const HOW: &str = "Those who may write approve it with `knotless comment "; | ||
pub const HOW: &str = "Anyone but its author who may write approves it with `knotless comment "; | ||
/// How it ends to say so. | ||
pub const FORCE: &str = "the owner merges past it with `--force`"; | ||
pub const FORCE: &str = "the owner, its author or not, merges past it with `--force`"; | ||
| ||
/// Why `pull` on `url` may not merge into `branch` as reviewed, or none | ||
/// when it may: what it lacks, the approvals that do not count, and what | ||
crates/knotless-mcp/src/lib.rs+1−1
| @@ -259,7 +259,7 @@ const MOST_WAIT: u64 = 300; | ||
const MOST_PICTURES: usize = 12; | ||
| ||
/// What to do about a pull's reviews, in a tool's words. | ||
const APPROVE_HERE: &str = "Those who may write approve it with the comment tool and verdict approve; the owner merges past it with the merge tool and force"; | ||
const APPROVE_HERE: &str = "Anyone but its author who may write approves it with the comment tool and verdict approve; the owner, its author or not, merges past it with the merge tool and force"; | ||
| ||
/// `text`, which may hold a refusal for a pull's reviews | ||
/// ([`approvals::refusal`]), with what to do said in tools rather than | ||
crates/knotless-mcp/tests/mcp.rs+1−1
| @@ -1663,7 +1663,7 @@ fn agents_fork_review_and_merge() { | ||
let why = checked["reason"].as_str().unwrap(); | ||
assert!(why.contains(&uncounted), "{why}"); | ||
assert!( | ||
why.ends_with("the owner merges past it with the merge tool and force"), | ||
why.ends_with("the owner, its author or not, merges past it with the merge tool and force"), | ||
"{why}" | ||
); | ||
let (text, err) = o.call("merge", json!({"repo": repo, "uri": mine})); | ||
crates/knotless-run/tests/run.rs+1−1
| @@ -3853,7 +3853,7 @@ fn a_merge_queue_waits_for_its_gate() { | ||
let shown = q.shows(&b, "merge queue: ejected"); | ||
// What it waits for and how long, then how to give it. | ||
let wanted = format!( | ||
"a review of its head from @{handle}. It waited 8s for that review. Those who may write" | ||
"a review of its head from @{handle}. It waited 8s for that review. Anyone but its author who may write" | ||
); | ||
assert!(shown.contains(&wanted), "{shown}"); | ||
} | ||
crates/knotless-serve/tests/gateway/reviewed.rs+1−1
| @@ -85,7 +85,7 @@ fn protected_branches_take_reviewed_pulls() { | ||
assert!(checked.contains(skipped), "{checked}"); | ||
} | ||
assert!( | ||
checked.ends_with("the owner merges past it with `--force`"), | ||
checked.ends_with("the owner, its author or not, merges past it with `--force`"), | ||
"{checked}" | ||
); | ||
let err = refusal(&bob, &["merge", &url, &pull]); | ||