From 5d72746d3cde0158479e744c895d0f2169914e0f Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 29 Jan 2024 11:29:33 -0500 Subject: [PATCH] Update close-pull-requests.yml --- .github/workflows/close-pull-requests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/close-pull-requests.yml b/.github/workflows/close-pull-requests.yml index 492748e3..56921852 100644 --- a/.github/workflows/close-pull-requests.yml +++ b/.github/workflows/close-pull-requests.yml @@ -9,13 +9,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - + + - name: Debug contains + echo: "The body of the pull request contains alfredodeza: ${{ contains(github.event.pull_request.body, 'alfredodeza' }} , and contains @alfredodeza: ${{ contains(github.event.pull_request.body, '@alfredodeza' }} + - name: Close PR if not pre-approved if: | ${{ !( contains(github.event.pull_request.labels.*.name, 'pre-approved') || - contains(github.event.pull_request.body, '@alfredodeza') + contains(github.event.pull_request.body, 'alfredodeza') ) }} run: | MESSAGE="This repository doesn't accept pull requests. Please fork the repository and make changes there. If you really need this PR to be merged you must be an admin and label this pr with the 'pre-approved' label *or* tag Alfredo Deza (alfredodeza) to take a look."