From 8d2637905ba920dd1f0e8f1212ec98e45420f514 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Mon, 13 Nov 2023 21:17:36 +0100 Subject: [PATCH] review-bot: trigger only on review approvals (#2289) Moved the review event of review-bot to only be triggered in approvals. Because we only update the required reviews when someone approves, this will stop the bot from immediately requesting a new review when someone comments or request changes as they should have been already notified in the first batch. --- .github/workflows/review-trigger.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/review-trigger.yml b/.github/workflows/review-trigger.yml index 1ae6b79ffbda..2810ea356e6e 100644 --- a/.github/workflows/review-trigger.yml +++ b/.github/workflows/review-trigger.yml @@ -13,7 +13,8 @@ on: jobs: trigger-review-bot: - if: github.event.pull_request.draft != true + # (It is not a draft) && (it is not a review || it is an approving review) + if: ${{ github.event.pull_request.draft != true && (github.event_name != 'pull_request_review' || (github.event.review && github.event.review.state == 'APPROVED')) }} runs-on: ubuntu-latest name: trigger review bot steps: