close_old_issues_and_prs.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: 'Close stale issues and PRs'
  2. on:
  3. schedule:
  4. # Once every day at midnight UTC
  5. - cron: "0 0 * * *"
  6. workflow_dispatch: # Allow to run workflow manually
  7. issue_comment: # Run workflow on comments
  8. jobs:
  9. stale:
  10. runs-on: ubuntu-latest
  11. permissions:
  12. issues: write
  13. pull-requests: write
  14. steps:
  15. - name: Mark/Close Stale Issues and Pull Requests 🗑️
  16. uses: actions/stale@v9.0.0
  17. with:
  18. repo-token: ${{ secrets.STALE_ACTION_PAT }}
  19. days-before-stale: 60
  20. days-before-close: 7
  21. stale-issue-message: >
  22. This issue has been automatically marked as stale because it has not had
  23. recent activity. It will be closed if no further activity occurs.
  24. stale-pr-message: >
  25. This pull request has been automatically marked as stale because it has not had
  26. recent activity. It will be closed if no further activity occurs.
  27. exempt-issue-labels: "pinned,security,enhancement,investigating,neverstale"
  28. exempt-pr-labels: "pinned,security,enhancement,investigating,neverstale"
  29. stale-issue-label: "stale"
  30. stale-pr-label: "stale"
  31. exempt-draft-pr: "true"
  32. close-issue-reason: "not_planned"
  33. operations-per-run: "250"
  34. ascending: "true"
  35. #DRY-RUN
  36. debug-only: "false"