GeezerVison is showing github.com — ci: create stale workflow (#309) · actions/create-github-app-token@8efbf9b
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +34Lines changed: 34 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +# This workflow warns and then closes issues that have had no activity for a specified amount of time. |
| 2 | +# https://github.com/actions/stale |
| 3 | + |
| 4 | +name: Stale |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + schedule: |
| 9 | + # 00:00 UTC on Mondays |
| 10 | + - cron: '0 0 * * 1' |
| 11 | + |
| 12 | +permissions: |
| 13 | + issues: write |
| 14 | + pull-requests: write |
| 15 | + |
| 16 | +env: |
| 17 | + DAYS_BEFORE_STALE: 180 |
| 18 | + DAYS_BEFORE_CLOSE: 60 |
| 19 | + STALE_LABEL: 'stale' |
| 20 | + STALE_LABEL_URL: ${{github.server_url}}/${{github.repository}}/labels/stale |
| 21 | + |
| 22 | +jobs: |
| 23 | + stale: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/stale@v10 |
| 27 | + with: |
| 28 | + operations-per-run: 100 |
| 29 | + days-before-stale: ${{ env.DAYS_BEFORE_STALE }} |
| 30 | + days-before-close: ${{ env.DAYS_BEFORE_CLOSE }} |
| 31 | + stale-issue-label: ${{ env.STALE_LABEL }} |
| 32 | + stale-pr-label: ${{ env.STALE_LABEL }} |
| 33 | + stale-issue-message: 'This issue has been marked ${{ env.STALE_LABEL_URL }} because it has been open for ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please close this issue if it is no longer needed. If this issue is still relevant and you would like it to remain open, simply update it within the next ${{ env.DAYS_BEFORE_CLOSE }} days.' |
| 34 | + stale-pr-message: 'This pull request has been marked ${{ env.STALE_LABEL_URL }} because it has been open for ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please close this pull request if it is no longer needed. If this pull request is still relevant and you would like it to remain open, simply update it within the next ${{ env.DAYS_BEFORE_CLOSE }} days.' |