|
| 1 | +# ---------------------------------------- |
| 2 | +# Scheduled stale issue & pull request check |
| 3 | +# |
| 4 | +# Adds 'stale' label after a set piece of time, |
| 5 | +# then closes stale issues & pull requests a short period after |
| 6 | +# |
| 7 | +# Using "Close Stale Issues" action |
| 8 | +# https://github.com/marketplace/actions/close-stale-issues |
| 9 | +# ---------------------------------------- |
| 10 | + |
| 11 | +name: 'Scheduled stale check' |
| 12 | +on: |
| 13 | + workflow_dispatch: |
| 14 | + schedule: |
| 15 | + - cron: "0 1 1 * *" # at 01:00 on first day of month |
| 16 | + |
| 17 | +jobs: |
| 18 | + stale: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - run: echo "🚀 Job automatically triggered by ${{ github.event_name }}" |
| 22 | + - run: echo "🐧 Job running on ${{ runner.os }} server" |
| 23 | + - run: echo "🐙 Using ${{ github.ref }} branch from ${{ github.repository }} repository" |
| 24 | + |
| 25 | + - uses: actions/stale@v9 |
| 26 | + with: |
| 27 | + stale-issue-message: 'After 30 days with no activity, the issue was automatically marked stale. Remove stale label or add a comment to prevent the issue being closed in 5 days.' |
| 28 | + stale-pr-message: 'After 45 days with no activity, the Pull Request was automatically marked stale. Remove stale label or comment to prevent the PR being closed in 10 days.' |
| 29 | + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' |
| 30 | + close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.' |
| 31 | + days-before-issue-stale: 30 |
| 32 | + days-before-pr-stale: 45 |
| 33 | + days-before-issue-close: 5 |
| 34 | + days-before-pr-close: 10 |
| 35 | + start-date: '2025-04-05T00:00:00Z' # only affect issues/PRs from date created (ISO 8601 or RFC 2822 format) |
| 36 | + any-of-labels: 'future,keep' # labels to keep |
| 37 | + exempt-issue-assignees: 'practicalli-johnny' |
| 38 | + exempt-pr-assignees: 'practicalli-johnny' |
| 39 | + |
| 40 | + # Summary |
| 41 | + - run: echo "🎨 Issues & Pull Request checked with actions/stale" |
| 42 | + - run: echo "🍏 Job status is ${{ job.status }}." |
0 commit comments