Clean Stale Issues And PR #740
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: Clean Stale Issues And PR | |
env: | |
STALE_ISSUE_LABEL: issue/stale | |
STALE_PR_LABEL: pr/stale | |
on: | |
schedule: | |
# each day | |
- cron: "0 20 * * *" | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Close stale issues | |
uses: actions/stale@v8.0.0 | |
with: | |
# ===== for issue | |
stale-issue-label: ${{ env.STALE_ISSUE_LABEL }} | |
# exclude all issues/PRs with milestones | |
exempt-all-issue-assignees: true | |
# exclude issues/PRs with the specified labels | |
exempt-issue-labels: pinned,security,good-first-issue | |
# reach idle days and marked as stale | |
days-before-issue-stale: 60 | |
stale-issue-message: | | |
This issue has been automatically marked as stale because it has not | |
had recent activity. It will be closed if no further activity occurs. | |
# after marked stale, how long will close it | |
days-before-issue-close: 14 | |
close-issue-message: | | |
This issue has not seen any activity since it was marked stale. | |
Closing. | |
# ====== for pr | |
stale-pr-label: ${{ env.STALE_PR_LABEL }} | |
exempt-pr-labels: pinned,security,good-first-issue | |
days-before-pr-stale: 60 | |
stale-pr-message: | | |
This pull request has been automatically marked as stale because it | |
has not had recent activity. It will be closed if no further activity | |
occurs. Thank you for your contributions. | |
days-before-pr-close: 14 | |
close-pr-message: | | |
This pull request has not seen any activity since it was marked stale. | |
Closing. |