From f0b7e85dc2fa2e9bc5fe1767cefb192ba13466b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20P=C3=A9rez?= <68171111+walpox@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:43:50 +0200 Subject: [PATCH 1/2] fix(ci): update pr workflow --- .github/workflows/no-pr.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/no-pr.yml b/.github/workflows/no-pr.yml index 9442376..df82bb8 100644 --- a/.github/workflows/no-pr.yml +++ b/.github/workflows/no-pr.yml @@ -12,15 +12,15 @@ on: jobs: close-pull-request: runs-on: ubuntu-20.04 - permissions: write-all + permissions: + pull-requests: write env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} COMMENT: | Thank you for your contribution to our project. - Our repositories hosted on GitHub are merely a mirror, - a backup of our main repositories on GitLab. + Our repositories hosted on GitHub are merely a mirror, a backup of our main repositories on GitLab. Please, submit your contributions to the corresponding repository on GitLab: @@ -28,8 +28,5 @@ jobs: That said, this pull request will be closed automatically. steps: - - name: Close the pull request with a reason and comment - run: gh issue close "${PULL_REQUEST_URL}" --reason "not planned" --comment "${COMMENT}" - - - + - name: Close the pull request with a comment + run: gh pr close "${PULL_REQUEST_URL}" --comment "${COMMENT}" From bd067e3ecdf578d0e494203d14181627adc0d33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20P=C3=A9rez?= <68171111+walpox@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:58:23 +0200 Subject: [PATCH 2/2] fix(ci): update workflow trigger The pull_request_target event runs on a trusted context, so hopefully it will resolve the auth error. --- .github/workflows/no-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no-pr.yml b/.github/workflows/no-pr.yml index df82bb8..655fd37 100644 --- a/.github/workflows/no-pr.yml +++ b/.github/workflows/no-pr.yml @@ -5,7 +5,7 @@ name: Decommission pull requests on GitHub on: - pull_request: + pull_request_target: types: - opened