Move unstale to the issue/pr manager Doesn't make sense to run the scheduled workflow and then skip most of it's jobs. And it looks weird in the PR boxy thingy

15dbadbfe0d86dafc29a5958928cc3f41538ba1f

Wolfsblvt <wolfsblvt@gmail.com>

3 files changed, +43 -34Ignore whitespace
.github/workflows/issues-auto-manager.yml+21 -1
@@ -1,8 +1,11 @@
11name: 🎯 Issues Auto Manager
22
33on:
44 issues:
55 types: [opened, edited, labeled, unlabeled]
6+ # Re also listen to comments, to remove stale labels right away
7+ issue_comment:
8+ types: [created]
69
710jobs:
811 label-on-content:
@@ -67,6 +70,23 @@ jobs:
6770 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
6871 labels: 'βœ–οΈ Not Reproducible,βœ–οΈ Not A Bug'
6972
73+ remove-stale-label:
74+ name: Remove Stale Label on Comment
75+ runs-on: ubuntu-latest
76+ # Only run this on new comments, to automatically remove the stale label
77+ if: github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]'
78+
79+ steps:
80+ - name: Remove Stale Label
81+ # πŸ€– Issues Helper
82+ # https://github.com/marketplace/actions/issues-helper
83+ uses: actions-cool/issues-helper@v3
84+ with:
85+ actions: 'remove-labels'
86+ token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
87+ issue-number: ${{ github.event.issue.number }}
88+ labels: '⚰️ Stale,πŸ•ΈοΈ Inactive,🚏 Awaiting User Response,πŸ›‘ No Response'
89+
7090 write-auto-comments:
7191 name: Post Issue Comments Based on Labels
7292 needs: [label-on-content, label-on-labels]
.github/workflows/job-close-stale.yml+0 -30
@@ -5,20 +5,11 @@ on:
55 workflow_dispatch:
66 schedule:
77 - 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
9- issue_comment:
10- types: [created]
11- pull_request_review_comment:
12- types: [created]
13- pull_request:
14- types: [synchronize]
158
169jobs:
1710 mark-inactivity:
1811 name: Mark Issues/PRs without Activity
1912 runs-on: ubuntu-latest
20- # Only run this on the actual scheduled workflow
21- if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
2213
2314 steps:
2415 - name: Mark Issues/PRs without Activity
@@ -53,8 +44,6 @@ jobs:
5344 name: Mark Issues/PRs Awaiting User Response
5445 runs-on: ubuntu-latest
5546 needs: mark-inactivity
56- # Only run this on the actual scheduled workflow
57- if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
5847
5948 steps:
6049 - name: Mark Issues/PRs Awaiting User Response
@@ -82,8 +71,6 @@ jobs:
8271 name: Mark Issues with Alternative Exists
8372 runs-on: ubuntu-latest
8473 needs: await-user-response
85- # Only run this on the actual scheduled workflow
86- if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
8774
8875 steps:
8976 - name: Mark Issues with Alternative Exists
@@ -106,20 +93,3 @@ jobs:
10693 stale-issue-label: '🚏 Awaiting User Response'
10794 close-issue-label: 'πŸ•ΈοΈ Inactive'
10895 exempt-issue-labels: 'πŸ“Œ 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- issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
125- labels: '⚰️ Stale,πŸ•ΈοΈ Inactive,🚏 Awaiting User Response,πŸ›‘ No Response'
.github/workflows/pr-auto-manager.yml+22 -3
@@ -1,8 +1,10 @@
11name: 🎯 Pull Request Auto Manager
22
33on:
44 pull_request_target:
55 types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed]
6+ pull_request_review_comment:
7+ types: [created]
68
79jobs:
810 check-merge-conflicts:
@@ -78,9 +80,26 @@ jobs:
7880 configuration-path: .github/pr-auto-labels-by-files.yml
7981 repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
8082
83+ remove-stale-label:
84+ name: Remove Stale Label on Comment
85+ runs-on: ubuntu-latest
86+ # Only runs when this is not done by the github actions bot
87+ if: github.actor != 'github-actions[bot]'
88+
89+ steps:
90+ - name: Remove Stale Label
91+ # πŸ€– Issues Helper
92+ # https://github.com/marketplace/actions/issues-helper
93+ uses: actions-cool/issues-helper@v3
94+ with:
95+ actions: 'remove-labels'
96+ token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
97+ issue-number: ${{ github.event.pull_request.number }}
98+ labels: '⚰️ Stale'
99+
81100 check-merge-blocking-labels:
82101 name: Check Merge Blocking Labels
83102 needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files]
84103 runs-on: ubuntu-latest
85104
86105 steps:
@@ -123,7 +142,7 @@ jobs:
123142
124143 write-auto-comments:
125144 name: Post PR Comments Based on Labels
126145 needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files, remove-stale-label]
127146 runs-on: ubuntu-latest
128147
129148 steps: