issue-assignees.temp.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # force copy from tencent/tdesign
  2. name: Issue Add Assigness
  3. on:
  4. issues:
  5. types: [opened, edited]
  6. jobs:
  7. mark-duplicate:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: wow-actions/auto-comment@v1
  11. with:
  12. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  13. issuesOpened: |
  14. 👋 @{{ author }},感谢给 TDesign 提出了 issue。
  15. 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
  16. # https://docs.github.com/cn/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues
  17. - uses: 94dreamer/issue-assignees@main
  18. id: assignees
  19. with:
  20. project_name: ${{github.event.repository.name}}
  21. issue_title: ${{github.event.issue.title}}
  22. - run: echo ${{ steps.assignees.outputs.contributors }}
  23. - name: Add assigness
  24. if: steps.assignees.outputs.contributors != ''
  25. uses: actions-cool/issues-helper@v3
  26. with:
  27. actions: 'add-assignees'
  28. token: ${{ secrets.GITHUB_TOKEN }}
  29. issue-number: ${{ github.event.issue.number }}
  30. assignees: ${{ steps.assignees.outputs.contributors }}
  31. - run: |
  32. contributors=${{ steps.assignees.outputs.contributors }}
  33. contributorstring=${contributors//,/ @}
  34. echo "::set-output name=string::@$contributorstring"
  35. id: contributors
  36. - name: 通知贡献者
  37. if: steps.assignees.outputs.contributors != ''
  38. uses: actions-cool/maintain-one-comment@v2.0.0
  39. with:
  40. token: ${{ secrets.GITHUB_TOKEN }}
  41. body: |
  42. ♥️ 有劳 ${{ steps.contributors.outputs.string }} 尽快确认问题。
  43. 确认有效后将下一步计划和可能需要的时间回复给 @${{ github.event.issue.user.login }} 。
  44. <!-- AUTO_ASSIGENEES_NOTIFY_HOOK -->
  45. number: ${{ github.event.issue.number }}
  46. body-include: "<!-- AUTO_ASSIGENEES_NOTIFY_HOOK -->"