2023-08-12 00:36:34 +08:00
|
|
|
# 当 PR 被合并时,留言欢迎加入共建群
|
|
|
|
name: PullRequest Contributor Welcome
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
paths:
|
|
|
|
- 'components/**'
|
|
|
|
|
|
|
|
jobs:
|
2023-08-22 19:01:34 +08:00
|
|
|
read-file:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
require-result: ${{ steps.contributors.outputs.content }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-05 11:55:52 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-08-22 19:01:34 +08:00
|
|
|
- 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 }}"
|
|
|
|
|
2023-08-12 00:36:34 +08:00
|
|
|
check-merged:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: read-file
|
|
|
|
if: github.event.pull_request.merged == true
|
|
|
|
steps:
|
|
|
|
- uses: actions-cool/maintain-one-comment@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
body: |
|
|
|
|
🎉 Thanks for contribution. Please feel free to join DingTalk Social Community (Provide the PR link please).
|
|
|
|
|
|
|
|
🎉 感谢参与贡献,欢迎扫码加入钉钉社区(进群后请提供 PR 地址)。
|
|
|
|
|
|
|
|
<img src="https://github.com/ant-design/ant-design/assets/5378891/e24c6080-bf38-4523-b1cd-f6c43ad7375f" height="200" />
|
|
|
|
|
|
|
|
<!-- WELCOME_CONTRIBUTION -->
|
2023-08-22 19:01:34 +08:00
|
|
|
body-include: '<!-- WELCOME_CONTRIBUTION -->'
|