From 8fd8f9247c51e706290eeb365fb1d0b80f7384a4 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Tue, 25 Jul 2023 16:19:55 +0800 Subject: [PATCH] Refactor Pull Request Reminder --- .github/label-commenter-config.yml | 6 ++++++ .github/workflows/label-commenter.yml | 3 +++ .github/workflows/labeler.yml | 3 ++- .github/workflows/pr-reminder.yml | 19 ------------------- 4 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/pr-reminder.yml diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml index eb000cd..1eb8ba9 100644 --- a/.github/label-commenter-config.yml +++ b/.github/label-commenter-config.yml @@ -27,3 +27,9 @@ labels: issue: body: This will not be worked on but we appreciate your contribution. action: close + - name: Configuration + labeled: + pr: + body: | + This pull request contains changes to the configuration file. Please make sure the documentation in [NexT website](https://theme-next.js.org/docs/) is changed or added. + Please edit relevant source files here: https://github.com/next-theme/theme-next-docs/tree/master/source/docs and create a pull request with the changes here: https://github.com/next-theme/theme-next-docs/pulls diff --git a/.github/workflows/label-commenter.yml b/.github/workflows/label-commenter.yml index 3cd505c..7ad9ffe 100644 --- a/.github/workflows/label-commenter.yml +++ b/.github/workflows/label-commenter.yml @@ -4,6 +4,9 @@ on: issues: types: - labeled + pull_request_target: + types: + - labeled jobs: comment: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 5ec9442..944f51f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -8,5 +8,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v4 + # https://github.com/peaceiris/actions-label-commenter#work-with-other-auto-label-actions with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + repo-token: "${{ secrets.GH_PAT }}" diff --git a/.github/workflows/pr-reminder.yml b/.github/workflows/pr-reminder.yml deleted file mode 100644 index ae4436f..0000000 --- a/.github/workflows/pr-reminder.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Pull Request Reminder - -on: - pull_request_target: - types: - - labeled - -jobs: - reminder: - if: ${{ github.event.label.name == 'Configurations' }} - runs-on: ubuntu-latest - - steps: - - name: Comment PR - uses: marocchino/sticky-pull-request-comment@v2 - with: - message: | - This pull request contains changes to the configuration file. Please make sure the documentation in [NexT website](https://theme-next.js.org/docs/) is changed or added. - Please edit relevant source files here: https://github.com/next-theme/theme-next-docs/tree/master/source/docs and create a pull request with the changes here: https://github.com/next-theme/theme-next-docs/pulls