From c62094a14b984d0b5e6955b30668504452198fd7 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:46:25 -0500 Subject: [PATCH] fix autoupdate label events Cannot use `pull_request_review` as it doesn't have access to secrets when a review is made by an outside member. --- .github/workflows/autoupdate-labeler.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autoupdate-labeler.yml b/.github/workflows/autoupdate-labeler.yml index 92b00988..5e426ad7 100644 --- a/.github/workflows/autoupdate-labeler.yml +++ b/.github/workflows/autoupdate-labeler.yml @@ -10,11 +10,8 @@ on: types: - edited - opened + - reopened - synchronize - pull_request_review: - types: - - edited - - submitted jobs: label_pr: @@ -40,11 +37,7 @@ jobs: steps.org_member.outputs.result == 'true' && contains(github.event.pull_request.labels.*.name, 'autoupdate') == false && contains(github.event.pull_request.body, - fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true && - ( - (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || - (github.event_name == 'pull_request') - ) + fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true uses: actions/github-script@v6 with: @@ -60,7 +53,6 @@ jobs: - name: Unlabel autoupdate if: >- contains(github.event.pull_request.labels.*.name, 'autoupdate') && - github.event_name == 'pull_request' && ( (github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') || (contains(github.event.pull_request.body,