|
| 1 | +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"). |
| 4 | +# You may not use this file except in compliance with the License. |
| 5 | +# A copy of the License is located at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# or in the "license" file accompanying this file. This file is distributed |
| 10 | +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 | +# express or implied. See the License for the specific language governing |
| 12 | +# permissions and limitations under the License. |
| 13 | + |
| 14 | +name: 'Close stale issues and PR' |
| 15 | +on: |
| 16 | + schedule: |
| 17 | + - cron: '0 20 * * SUN' # every Sunday at 20 am UTC: PST 0:00 AM " |
| 18 | + |
| 19 | + |
| 20 | +jobs: |
| 21 | + stale-close: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + steps: |
| 24 | + - name: Mark the issues/pr |
| 25 | + uses: actions/stale@v6 |
| 26 | + env: |
| 27 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} #Github workflow will add a temporary token when executing the workflow |
| 28 | + with: |
| 29 | + #Github stale actions: https://github.com/actions/stale |
| 30 | + #Message |
| 31 | + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled' |
| 32 | + stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.' |
| 33 | + close-issue-message: 'This issue was closed because it has been marked as stale for 30 days with no activity.' |
| 34 | + #Labels |
| 35 | + stale-issue-label: stale #Mark the issue as closing-soon if staling for 60 days |
| 36 | + stale-pr-label: stale #Mark the pr as no-pr-activity if staling for 30 days |
| 37 | + #Days required |
| 38 | + days-before-issue-stale: 90 #Mark the issues as after 90 days |
| 39 | + days-before-pr-stale: 60 #Mark the PR as stale after 60 days |
| 40 | + days-before-issue-close: 30 #Close the issue if the issue has been marked as stale for 30 days |
| 41 | + days-before-pr-close: -1 #Never close down the PR and keep the label stale on the PR |
| 42 | + #Optionals |
| 43 | + enable-statistics: true #Show the statistics of what have done so far |
| 44 | + operations-per-run: 100 #Max number of operations per run |
| 45 | + exempt-all-milestones: true #Exempt issues/PRs that have milestones from staleness checking |
0 commit comments