From c007c702daeca1c45171a306c3aab54b68361b64 Mon Sep 17 00:00:00 2001 From: Kuitos Date: Wed, 28 Jun 2023 12:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A5=20add=20pr=20contributor=20workflo?= =?UTF-8?q?w=20(#2539)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-checker.yml | 44 ++++++++++++++++++++++++++++++++ contributors.json | 1 + 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/pr-checker.yml create mode 100644 contributors.json diff --git a/.github/workflows/pr-checker.yml b/.github/workflows/pr-checker.yml new file mode 100644 index 0000000..c4126a8 --- /dev/null +++ b/.github/workflows/pr-checker.yml @@ -0,0 +1,44 @@ +name: PullRequest Checker + +on: + pull_request_target: + types: + - closed + paths-ignore: + - 'docs/**' + +jobs: + read-file: + runs-on: ubuntu-latest + outputs: + require-result: ${{ steps.contributors.outputs.content }} + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Read contributors.json + id: contributors + uses: juliangruber/read-file-action@v1 + with: + path: ./contributors.json + + output-log: + runs-on: ubuntu-latest + needs: read-file + steps: + - name: contributors.json + run: echo "${{ needs.read-file.outputs.require-result }}" + - name: creator + run: echo "${{ github.event.pull_request.user.login }}" + - name: contains + run: echo "${{ contains(fromJSON(needs.read-file.outputs.require-result), github.event.pull_request.user.login) }}" + - name: merged + run: echo "${{ github.event.pull_request.merged }}" + + check-merged: + runs-on: ubuntu-latest + needs: read-file + if: contains(fromJSON(needs.read-file.outputs.require-result), github.event.pull_request.user.login) == false && github.event.pull_request.merged == true + steps: + - uses: actions-cool/maintain-one-comment@v3 + with: + body: 感谢 PR!如果有兴趣一起参与维护 Qiankun,可加入我们的 Qiankun Contributors 群。加入方式是先用钉钉扫下方二维码加我钉钉,记得注明 github id,然后我会拉你到群里。
diff --git a/contributors.json b/contributors.json new file mode 100644 index 0000000..b5f8d36 --- /dev/null +++ b/contributors.json @@ -0,0 +1 @@ +["kuitos", "gongshun"]