[加入申请] #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Process Join Application | |
on: | |
issues: | |
types: | |
- labeled | |
jobs: | |
ProcessJoinApplication: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Label | |
id: check-label | |
uses: actions/github-script@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
let labels = context.payload.issue.labels.map((label) => label.name); | |
let action = "none"; | |
if (!labels.includes("· Join-application")) { | |
action = "none"; | |
} else if (labels.includes("√ Approved")) { | |
action = "approved"; | |
} else if (labels.includes("× Rejected")) { | |
action = "rejected"; | |
} else if (labels.includes("🚧 Pending")) { | |
action = "none"; | |
} else { | |
action = "welcome"; | |
} | |
console.log("Issue Action: "+action); | |
core.setOutput("run-actions", action); | |
- name: Welcome - Send Welcome Message | |
if: steps.check-label.outputs.run-actions == 'welcome' | |
uses: actions-cool/[email protected] | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
我们已经收到了您的申请,并会尽快处理,请耐心等待。 | |
另请注意,我们可能会要求您提交更多信息。因此,请关注您的 GitHub 绑定邮箱通知。 | |
若您未在 24 小时内回复我们的要求,我们将关闭您的申请,不过您还可以再次提交。 | |
- name: Approved - Send Approved Message | |
if: steps.check-label.outputs.run-actions == 'approved' | |
uses: actions-cool/[email protected] | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
恭喜您,我们已经同意您的申请!欢迎加入 IT Craft Development Team! | |
- name: Approved - Close Issue As Completed | |
if: steps.check-label.outputs.run-actions == 'approved' | |
uses: actions-cool/[email protected] | |
with: | |
actions: 'close-issue' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
close-reason: 'completed' | |
- name: Rejected - Send Rejected Message | |
if: steps.check-label.outputs.run-actions == 'rejected' | |
uses: actions-cool/[email protected] | |
with: | |
actions: 'create-comment' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
感谢您对 IT Craft Development Team 的兴趣和支持。我们很高兴收到您的加入申请,但很遗憾地通知您,您的申请没有通过。 | |
我们寻找具有创新能力或与我们志同道合的成员。根据您提交的申请,我们认为您的思想或技能水平还不符合我们的要求。我们建议您在以下方面提高自己: | |
- 掌握至少一种主流编程语言,如 Python, Java, Rust 等。 | |
- 了解常用的软件开发工具,如 VSCode, Pycharm, IDEA 等。 | |
- 参与一些有创新性的项目,展示您的解决问题和协作能力。 | |
我们对您的未来发展表示祝福,并希望您能够继续关注我们的团队动态。如果您有任何疑问或反馈,请随时联系我们。 | |
- name: Rejected - Close Issue As Not Planned | |
if: steps.check-label.outputs.run-actions == 'rejected' | |
uses: actions-cool/[email protected] | |
with: | |
actions: 'close-issue' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.issue.number }} | |
close-reason: 'not_planned' |