Clean Stale Issues And PR #985
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 | |
on: | |
schedule: | |
# run 4:00 am each day in shanghai timezone | |
# cron by UTC, shanghai timezone = UTC + 8 | |
- cron: "0 20 * * *" | |
permissions: | |
issues: write | |
pull-requests: write | |
env: | |
STALE_ISSUE_LABEL: issue/stale | |
STALE_PR_LABEL: pr/stale | |
jobs: | |
stale: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/marketplace/actions/close-stale-issues | |
- name: Close stale issues | |
uses: actions/[email protected] | |
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. |