2023-11-30 15:02:32 +08:00
# 当 PR 被合并时,留言欢迎加入共建群
name : PullRequest Contributor Welcome
on :
2023-12-25 10:29:53 +08:00
pull_request_target :
2023-11-30 15:02:32 +08:00
types :
- closed
paths :
- 'components/**'
2023-12-25 10:29:53 +08:00
permissions :
contents : read
2023-11-30 15:02:32 +08:00
jobs :
comment :
2023-12-25 10:29:53 +08:00
permissions :
issues : write # for actions-cool/maintain-one-comment to modify or create issue comments
pull-requests : write # for actions-cool/maintain-one-comment to modify or create PR comments
2023-11-30 15:02:32 +08:00
if : github.event.pull_request.merged == true && github.repository == 'ant-design/ant-design'
runs-on : ubuntu-latest
steps :
2024-03-27 21:40:24 +08:00
- name : get commit count
id : get_commit_count
run : |
PR_AUTHOR=$(echo "${{ github.event.pull_request.user.login }}")
RESULT_DATA=$(curl -s "https://api.github.com/repos/${{ github.repository }}/commits?author=${PR_AUTHOR}&per_page=5")
DATA_LENGTH=$(echo $RESULT_DATA | jq 'if type == "array" then length else 0 end')
echo "COUNT=$DATA_LENGTH" >> $GITHUB_OUTPUT
2023-11-30 15:02:32 +08:00
- name : Comment on PR
2024-03-27 21:40:24 +08:00
if : steps.get_commit_count.outputs.COUNT < 3
2023-11-30 15:02:32 +08:00
uses : actions-cool/maintain-one-comment@v3
with :
token : ${{ secrets.GITHUB_TOKEN }}
body : |
🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).
🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。
2024-09-02 23:51:59 +08:00
<img src="https://github.com/user-attachments/assets/cfee105e-8731-481f-a336-92b79a84d35a" height="200" />
2023-11-30 15:02:32 +08:00
<!-- WELCOME_CONTRIBUTION -->
2023-12-25 10:29:53 +08:00
body-include : '<!-- WELCOME_CONTRIBUTION -->'