diff --git a/hive-forge/src/verbs/lint.rs b/hive-forge/src/verbs/lint.rs index 64c2cc2f..2c4b2048 100644 --- a/hive-forge/src/verbs/lint.rs +++ b/hive-forge/src/verbs/lint.rs @@ -173,14 +173,16 @@ fn run_no_reviewer(client: &Client, args: NoReviewerArgs) -> Result<()> { if body.contains(&needle) { continue; } - let comments = - client.get_json(&format!("/repos/{repo}/issues/{number}/comments?limit=50"))?; - let mentioned = comments.as_array().is_some_and(|a| { - a.iter().any(|c| { - c.get("body") - .and_then(Value::as_str) - .is_some_and(|body| body.contains(&needle)) - }) + // Paginate so PRs with >50 comments don't yield false positives + // (argus nit on #507). Same 1000-comment ceiling as elsewhere. + let comments = client.get_json_all( + &format!("/repos/{repo}/issues/{number}/comments?limit={PAGE_LIMIT}"), + MAX_PAGES, + )?; + let mentioned = comments.iter().any(|c| { + c.get("body") + .and_then(Value::as_str) + .is_some_and(|body| body.contains(&needle)) }); if !mentioned { missing.push(trim_item(pr));