From a84f14d85d4b0df5dc4d334fc763e44e08caa95a Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 15 Oct 2024 18:40:02 +0300 Subject: T6781: Use action to auto-close PRs (#4158) --- .github/workflows/pr-auto-close.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-auto-close.yml b/.github/workflows/pr-auto-close.yml index 36e1bba0e..40e13a25b 100644 --- a/.github/workflows/pr-auto-close.yml +++ b/.github/workflows/pr-auto-close.yml @@ -1,17 +1,18 @@ name: Auto-Close Pull Requests Circinus on: - pull_request: + pull_request_target: + types: + - opened branches: - circinus jobs: - auto_close_pr: + run: runs-on: ubuntu-latest steps: - - name: Close PR - run: | - set -eux - gh pr close ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --comment "Pull requests to this branch are not accepted and have been closed automatically." - env: - GH_TOKEN: ${{ secrets.PAT }} + - uses: superbrothers/close-pull-request@v3 + with: + # Optional. Post a issue comment just before closing a pull request. + comment: "Pull requests to this branch are not accepted and have been closed automatically." + github_token: ${{ secrets.PAT }} -- cgit v1.2.3