Close Stale Issues #4
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: 'Close Stale Issues' | |
on: | |
issues: | |
types: [edited, pinned, unpinned, reopened] | |
issue_comment: | |
pull_request: | |
types: [edited, reopened, synchronize, convert_to_draft, ready_for_review] | |
workflow_dispatch: | |
schedule: | |
- cron: '59 23 1/30 * *' | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
stale: | |
if: | | |
contains(github.event.pull_request.labels.*.name, 'stale') || | |
contains(github.event.issue.labels.*.name, 'stale') || | |
${{ github.event_name == 'schedule' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/stale@main | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
days-before-issue-stale: 30 | |
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. Thank you for your contributions." | |
days-before-issue-close: 14 | |
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as `stale`." | |
stale-issue-label: "stale" | |
exempt-issue-labels: "bug,in progress,help wanted" | |
days-before-pr-stale: 61 | |
days-before-pr-close: -1 | |
stale-pr-message: "This pull request has been automatically marked as `stale` because it has not had recent activity." | |
stale-pr-label: "stale" | |
exempt-pr-labels: "bug,in progress,help wanted" | |
remove-stale-when-updated: "true" | |
remove-issue-stale-when-updated: "true" | |
remove-pr-stale-when-updated: "true" | |
labels-to-remove-when-unstale: "stale" | |
# delete-branch: true | |
# exempt-draft-pr: true |