issue-close-require.yml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. # 每天零点运行一次,它会检查所有带有 "need reproduction" 标签的 Issues。如果这些 Issues 在过去的 3 天内没有任何活动,它们将会被自动关闭。这有助于保持 Issue 列表的整洁,并且提醒用户在必要时提供更多的信息。
  2. name: Issue Close Require
  3. # 触发条件:每天零点
  4. on:
  5. workflow_dispatch:
  6. schedule:
  7. - cron: '0 0 * * *'
  8. permissions:
  9. pull-requests: write
  10. contents: write
  11. issues: write
  12. jobs:
  13. close-issues:
  14. if: github.repository == 'vbenjs/vue-vben-admin'
  15. runs-on: ubuntu-latest
  16. steps:
  17. # 关闭未活动的 Issues
  18. - name: Close Inactive Issues
  19. uses: actions/stale@v9
  20. with:
  21. days-before-stale: -1 # Issues and PR will never be flagged stale automatically.
  22. stale-issue-label: needs-reproduction # Label that flags an issue as stale.
  23. only-labels: needs-reproduction # Only process these issues
  24. days-before-issue-close: 3
  25. ignore-updates: true
  26. remove-stale-when-updated: false
  27. close-issue-message: This issue was closed because it was open for 3 days without a valid reproduction.
  28. close-issue-label: closed-by-action