mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
workflows/check-cherry-picks: minimize more than one old review
After we removed the dismissed-review workflow, it can happen that multiple non-minimized reviews exist after a force push. To avoid cluttering the PR's history while it's actively worked on, we minimize all of them instead of only the latest.
This commit is contained in:
parent
d3df330c5c
commit
82c6ea2ddc
1 changed files with 10 additions and 9 deletions
5
.github/workflows/check-cherry-picks.yml
vendored
5
.github/workflows/check-cherry-picks.yml
vendored
|
@ -115,9 +115,9 @@ jobs:
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
pull_number: context.payload.pull_request.number
|
pull_number: context.payload.pull_request.number
|
||||||
})).filter(review =>
|
})).filter(review =>
|
||||||
review.user.login == 'github-actions[bot]' &&
|
review.user.login == 'github-actions[bot]'
|
||||||
review.state == 'CHANGES_REQUESTED'
|
|
||||||
).map(async (review) => {
|
).map(async (review) => {
|
||||||
|
if (review.state == 'CHANGES_REQUESTED') {
|
||||||
await github.rest.pulls.dismissReview({
|
await github.rest.pulls.dismissReview({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
@ -125,6 +125,7 @@ jobs:
|
||||||
review_id: review.id,
|
review_id: review.id,
|
||||||
message: 'All cherry-picks are good now, thank you!'
|
message: 'All cherry-picks are good now, thank you!'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
await github.graphql(`mutation($node_id:ID!) {
|
await github.graphql(`mutation($node_id:ID!) {
|
||||||
minimizeComment(input: {
|
minimizeComment(input: {
|
||||||
classifier: RESOLVED,
|
classifier: RESOLVED,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue