feat(#2327): surface forgejo stale/dismissed review flags in pr-status/reviews/merge
This commit is contained in:
parent
078ea74ba9
commit
cd092a8ae4
4 changed files with 77 additions and 26 deletions
|
|
@ -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!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue