Directly remove stale labels on comments

ecaee2dbbf145e2da92667970177df2e1ef0a8ce

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +28 -3Showing whitespace changes
.github/workflows/job-close-stale.yml+28 -3
@@ -1,17 +1,24 @@
1name: 🎯 Close Stale Issues/PRs Workflow1name: 🎯 Close Stale Issues/PRs Workflow
22
3on:3on:
4 # Run the workflow every day
4 workflow_dispatch:5 workflow_dispatch:
5 schedule:6 schedule:
6 - cron: '0 0 * * *' # Runs every day at midnight UTC7 - cron: '0 0 * * *' # Runs every day at midnight UTC
8 # Re also listen to comment created events or new PR pushes, to remove stale labels right away
7 issue_comment:9 issue_comment:
8 types: [created]10 types: [created]
911 pull_request_review_comment:
12 types: [created]
13 pull_request:
14 types: [synchronize]
1015
11jobs:16jobs:
12 mark-inactivity:17 mark-inactivity:
13 name: Mark Issues/PRs without Activity18 name: Mark Issues/PRs without Activity
14 runs-on: ubuntu-latest19 runs-on: ubuntu-latest
20 # Only run this on the actual scheduled workflow
21 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
1522
16 steps:23 steps:
17 - name: Mark Issues/PRs without Activity24 - name: Mark Issues/PRs without Activity
@@ -41,12 +48,13 @@ jobs:
41 close-pr-label: 'πŸ•ΈοΈ Inactive'48 close-pr-label: 'πŸ•ΈοΈ Inactive'
42 exempt-issue-labels: 'πŸ“Œ Keep Open'49 exempt-issue-labels: 'πŸ“Œ Keep Open'
43 exempt-pr-labels: 'πŸ“Œ Keep Open'50 exempt-pr-labels: 'πŸ“Œ Keep Open'
44 labels-to-add-when-unstale: 'πŸ“Œ Keep Open'
4551
46 await-user-response:52 await-user-response:
47 name: Mark Issues/PRs Awaiting User Response53 name: Mark Issues/PRs Awaiting User Response
48 runs-on: ubuntu-latest54 runs-on: ubuntu-latest
49 needs: mark-inactivity55 needs: mark-inactivity
56 # Only run this on the actual scheduled workflow
57 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
5058
51 steps:59 steps:
52 - name: Mark Issues/PRs Awaiting User Response60 - name: Mark Issues/PRs Awaiting User Response
@@ -74,6 +82,8 @@ jobs:
74 name: Mark Issues with Alternative Exists82 name: Mark Issues with Alternative Exists
75 runs-on: ubuntu-latest83 runs-on: ubuntu-latest
76 needs: await-user-response84 needs: await-user-response
85 # Only run this on the actual scheduled workflow
86 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
7787
78 steps:88 steps:
79 - name: Mark Issues with Alternative Exists89 - name: Mark Issues with Alternative Exists
@@ -96,4 +106,19 @@ jobs:
96 stale-issue-label: '🚏 Awaiting User Response'106 stale-issue-label: '🚏 Awaiting User Response'
97 close-issue-label: 'πŸ•ΈοΈ Inactive'107 close-issue-label: 'πŸ•ΈοΈ Inactive'
98 exempt-issue-labels: 'πŸ“Œ Keep Open'108 exempt-issue-labels: 'πŸ“Œ Keep Open'
99 labels-to-add-when-unstale: 'πŸ“Œ Keep Open'109
110 remove-stale-label:
111 name: Remove Stale Label on Comment
112 runs-on: ubuntu-latest
113 # Only run this on new comments or PR commits, to automatically remove the stale label
114 if: (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'pull_request') && github.actor != 'github-actions[bot]'
115
116 steps:
117 - name: Remove Stale Label
118 # πŸ€– Issues Helper
119 # https://github.com/marketplace/actions/issues-helper
120 uses: actions-cool/issues-helper@v3
121 with:
122 actions: 'remove-labels'
123 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
124 labels: '⚰️ Stale,πŸ•ΈοΈ Inactive,🚏 Awaiting User Response,πŸ›‘ No Response'