|
| 1 | +name: "Close stale issues" |
| 2 | + |
| 3 | +# Controls when the action will run. |
| 4 | +on: |
| 5 | + # allows doing a manual trigger of the action |
| 6 | + workflow_dispatch: |
| 7 | + # disable cron until dry run is completed successfully |
| 8 | + # schedule: |
| 9 | + # - cron: "0 0 * * *" |
| 10 | + |
| 11 | +permissions: {} |
| 12 | +jobs: |
| 13 | + cleanup: |
| 14 | + permissions: |
| 15 | + issues: write # to label, comment and close issues (aws-actions/stale-issue-cleanup) |
| 16 | + |
| 17 | + runs-on: ubuntu-latest |
| 18 | + name: Stale issues |
| 19 | + steps: |
| 20 | + - uses: aws-actions/stale-issue-cleanup@v6 |
| 21 | + with: |
| 22 | + # Types of issues that will be processed |
| 23 | + issue-types: issues |
| 24 | + # Setting messages to an empty string will cause the automation to skip |
| 25 | + # that category |
| 26 | + stale-issue-message: This issue is missing required information and will be closed in 7 days. To keep the issue open, leave a comment. |
| 27 | + # this has been added as a placeholder but will likely not be used because the timeline is set as 100 years |
| 28 | + ancient-issue-message: This issue will automatically close because it has stalled for 1 year. To keep the issue open, leave a comment. |
| 29 | + |
| 30 | + # These labels are required |
| 31 | + stale-issue-label: closing-soon |
| 32 | + exempt-issue-labels: no-autoclose |
| 33 | + response-requested-label: needs-response |
| 34 | + closed-for-staleness-label: closed-for-staleness |
| 35 | + |
| 36 | + # Issue timing |
| 37 | + days-before-stale: 30 |
| 38 | + days-before-close: 7 |
| 39 | + # setting this to 100 years to avoid closing valid old issues that are yet to be triaged |
| 40 | + days-before-ancient: 36500 |
| 41 | + |
| 42 | + # If you don't want to mark an issue as being ancient based on a |
| 43 | + # threshold of "upvotes", you can set this here. An "upvote" is |
| 44 | + # the total number of +1, heart, hooray, and rocket reactions |
| 45 | + # on an issue. |
| 46 | + minimum-upvotes-to-exempt: 5 |
| 47 | + |
| 48 | + # Leave this alone, or set to a PAT for the action to use |
| 49 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 50 | + # Testing/debugging options |
| 51 | + loglevel: DEBUG |
| 52 | + # Set dry-run to true to not perform label or close actions. |
| 53 | + dry-run: true |
0 commit comments