From bcfc73ad574caa4e88ce8fda14af3a4ad88740c9 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 4 Jan 2025 13:06:03 +0900 Subject: [PATCH] =?UTF-8?q?enhance(gh):=20Allow=20edits=20and=20access=20t?= =?UTF-8?q?o=20secrets=20by=20maintainers=E3=81=8C=E7=84=A1=E5=8A=B9?= =?UTF-8?q?=E3=81=AA=E5=A0=B4=E5=90=88=E3=80=81=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-pr-maintainer.yml | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/check-pr-maintainer.yml diff --git a/.github/workflows/check-pr-maintainer.yml b/.github/workflows/check-pr-maintainer.yml new file mode 100644 index 0000000000..2b2e92d76b --- /dev/null +++ b/.github/workflows/check-pr-maintainer.yml @@ -0,0 +1,31 @@ +name: Check PR can be modified by maintainer + +on: + pull_request_target: + branches: + - master + - develop + +jobs: + check-pr-maintainer: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Send Message + if: github.event.pull_request.maintainer_can_modify != 'true' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: check-pr-maintainer + message: | + Please allow maintainers to modify this Pull Request so that we can help you with your changes. + You can do this by checking the box "Allow edits and access to secrets by maintainers" in the Pull Request settings. + - name: Send Message + if: github.event.pull_request.maintainer_can_modify == 'true' + uses: thollander/actions-comment-pull-request@v2 + with: + comment_tag: check-pr-maintainer + mode: delete + message: | + Thank you! + create_if_not_exists: false