fix(#2327): handle dismissed reviews like stale (superseded helper)
This commit is contained in:
parent
cd092a8ae4
commit
ce909a00a2
3 changed files with 38 additions and 16 deletions
|
|
@ -157,12 +157,12 @@ 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). A stale REQUEST_CHANGES was made against an older
|
||||
// head and no longer applies, so it doesn't block. Shares the verdict
|
||||
// REQUEST_CHANGES). A superseded REQUEST_CHANGES — stale (older head) or
|
||||
// dismissed — 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(|r| r.state == "REQUEST_CHANGES" && !r.stale)
|
||||
.filter(|r| r.state == "REQUEST_CHANGES" && !r.superseded())
|
||||
.map(|r| r.login)
|
||||
.collect();
|
||||
if !blockers.is_empty() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue