feat(#2327): surface forgejo stale/dismissed review flags in pr-status/reviews/merge

This commit is contained in:
damocles 2026-07-10 14:50:19 +02:00 committed by mara
commit cd092a8ae4
4 changed files with 77 additions and 26 deletions

View file

@ -157,11 +157,13 @@ fn check_ready(client: &Client, repo: &str, number: u64, pull: &PullRequest) ->
// Block only on reviewers whose *current* verdict requests changes
// (latest-per-reviewer, so a later APPROVED clears an earlier
// REQUEST_CHANGES). Shares the verdict logic with `pr-status`.
// REQUEST_CHANGES). A stale REQUEST_CHANGES was made against an older
// head and no longer applies, so it doesn't block. Shares the verdict
// logic with `pr-status`.
let blockers: Vec<String> = super::latest_reviews(client, repo, number)?
.into_iter()
.filter(|(_, st)| st == "REQUEST_CHANGES")
.map(|(login, _)| login)
.filter(|r| r.state == "REQUEST_CHANGES" && !r.stale)
.map(|r| r.login)
.collect();
if !blockers.is_empty() {
bail!(