| name: π Close Stale Issues/PRs Workflow |
|
|
| on: |
| |
| workflow_dispatch: |
| schedule: |
| - cron: '0 0 * * *' |
|
|
| permissions: |
| contents: read |
| issues: write |
| pull-requests: write |
|
|
| jobs: |
| mark-inactivity: |
| name: β³ Mark Issues/PRs without Activity |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Mark Issues/PRs without Activity |
| |
| |
| uses: actions/stale@v9.1.0 |
| with: |
| repo-token: ${{ steps.app.outputs.token }} |
| days-before-stale: 183 |
| days-before-close: 7 |
| operations-per-run: 30 |
| remove-stale-when-updated: true |
| enable-statistics: true |
| stale-issue-message: > |
| β³ This issue has been inactive for 6 months. If it's still relevant, drop a comment below to keep it open. |
| Otherwise, it will be auto-closed in 7 days. |
| stale-pr-message: > |
| β³ This PR has been inactive for 6 months. If it's still relevant, update it or remove the stale label. |
| Otherwise, it will be auto-closed in 7 days. |
| close-issue-message: > |
| π This issue was auto-closed due to inactivity for over 6 months. |
| close-pr-message: > |
| π This PR was auto-closed due to inactivity for over 6 months. |
| stale-issue-label: 'β°οΈ Stale' |
| close-issue-label: 'πΈοΈ Inactive' |
| stale-pr-label: 'β°οΈ Stale' |
| close-pr-label: 'πΈοΈ Inactive' |
| exempt-issue-labels: 'π Keep Open' |
| exempt-pr-labels: 'π Keep Open' |
|
|
| await-user-response: |
| name: β οΈ Mark Issues/PRs Awaiting User Response |
| needs: [mark-inactivity] |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Mark Issues/PRs Awaiting User Response |
| |
| |
| uses: actions/stale@v9.1.0 |
| with: |
| repo-token: ${{ steps.app.outputs.token }} |
| days-before-stale: 7 |
| days-before-close: 7 |
| operations-per-run: 30 |
| remove-stale-when-updated: true |
| stale-issue-message: > |
| β οΈ Hey! We need some more info to move forward with this issue. |
| Please provide the requested details in the next few days to keep this ticket open. |
| close-issue-message: > |
| π This issue was auto-closed due to no response from user. |
| only-labels: 'π Awaiting User Response' |
| labels-to-remove-when-unstale: 'π Awaiting User Response' |
| stale-issue-label: 'π No Response' |
| close-issue-label: 'πΈοΈ Inactive' |
| exempt-issue-labels: 'π§ Alternative Exists' |
|
|
| alternative-exists: |
| name: π Mark Issues with Alternative Exists |
| needs: [mark-inactivity, await-user-response] |
| runs-on: ubuntu-latest |
| if: always() |
|
|
| steps: |
| - name: Mint App Token |
| id: app |
| |
| |
| uses: actions/create-github-app-token@v2 |
| with: |
| app-id: ${{ vars.ST_BOT_APP_ID }} |
| private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }} |
| owner: ${{ github.repository_owner }} |
|
|
| - name: Mark Issues with Alternative Exists |
| |
| |
| uses: actions/stale@v9.1.0 |
| with: |
| repo-token: ${{ steps.app.outputs.token }} |
| days-before-stale: 7 |
| days-before-close: 7 |
| operations-per-run: 30 |
| remove-stale-when-updated: true |
| stale-issue-message: > |
| π An alternative solution has been provided for this issue. |
| Did this solve your problem? If so, we'll go ahead and close it. |
| If you still need help, drop a comment within the next 7 days to keep this open. |
| close-issue-message: > |
| β
Closing this issue due to no confirmation on the alternative solution. |
| only-labels: 'π§ Alternative Exists' |
| stale-issue-label: 'π Awaiting User Response' |
| close-issue-label: 'πΈοΈ Inactive' |
| exempt-issue-labels: 'π Keep Open' |
|
|