From 95c4bf2be2ee05a1162e4ab3bba4918b38ca7f81 Mon Sep 17 00:00:00 2001 From: William Harrison Date: Sat, 18 Feb 2023 07:27:28 +0800 Subject: [PATCH 1/3] Update and rename labeler.yml to pr.yml --- .github/workflows/{labeler.yml => pr.yml} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename .github/workflows/{labeler.yml => pr.yml} (88%) diff --git a/.github/workflows/labeler.yml b/.github/workflows/pr.yml similarity index 88% rename from .github/workflows/labeler.yml rename to .github/workflows/pr.yml index 028f5b7..c2e7b48 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/pr.yml @@ -1,10 +1,11 @@ -name: Labeler +name: PR on: - pull_request_target jobs: - triage: + label: + name: Label permissions: contents: read pull-requests: write From 467c150ccabc7a375f5ff8148b054e2bfab3465d Mon Sep 17 00:00:00 2001 From: William Harrison Date: Sat, 18 Feb 2023 07:29:28 +0800 Subject: [PATCH 2/3] Update pr.yml --- .github/workflows/pr.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c2e7b48..adef93a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,3 +15,13 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true + check-star: + name: Check Star + runs-on: ubuntu-latest + steps: + - { uses: gacts/is-stargazer@v1, with: { username: "${{ github.event.pull_request.user.login }}" }, id: check-star } + + - if: steps.check-star.outputs.is-stargazer != 'true' + uses: actions/github-script@v6 + with: + script: core.setFailed('⭐ Please star the repository!') From 7f548eb404ff2e6bcd64ebe97c09a6d49f8cd22d Mon Sep 17 00:00:00 2001 From: William Harrison Date: Sat, 18 Feb 2023 07:29:39 +0800 Subject: [PATCH 3/3] Delete star.yml --- .github/workflows/star.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/star.yml diff --git a/.github/workflows/star.yml b/.github/workflows/star.yml deleted file mode 100644 index e9bf5b9..0000000 --- a/.github/workflows/star.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Star - -on: - pull_request_target: - types: [opened, synchronize, reopened, ready_for_review, review_requested] - branches: [main] - -jobs: - check-user-star: - name: Check - runs-on: ubuntu-latest - steps: - - { uses: gacts/is-stargazer@v1, with: { username: "${{ github.event.pull_request.user.login }}" }, id: check-star } - - - if: steps.check-star.outputs.is-stargazer != 'true' - uses: actions/github-script@v6 - with: - script: core.setFailed('⭐ Please star the repository!')