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 @@
1name: 🎯 Issues Auto Manager1name: 🎯 Issues Manager
22
3on:3on:
4 issues:4 issues:
5 types: [opened, edited, labeled, unlabeled]5 types: [opened, edited, labeled, unlabeled]
6 # Re also listen to comments, to remove stale labels right away
7 issue_comment:
8 types: [created]
69
7jobs:10jobs:
8 label-on-content:11 label-on-content:
@@ -67,6 +70,23 @@ jobs:
67 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}70 token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
68 labels: 'βœ–οΈ Not Reproducible,βœ–οΈ Not A Bug'71 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
70 write-auto-comments:90 write-auto-comments:
71 name: Post Issue Comments Based on Labels91 name: Post Issue Comments Based on Labels
72 needs: [label-on-content, label-on-labels]92 needs: [label-on-content, label-on-labels]
.github/workflows/job-close-stale.yml+0 -30
@@ -5,20 +5,11 @@ on:
5 workflow_dispatch:5 workflow_dispatch:
6 schedule:6 schedule:
7 - 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
9 issue_comment:
10 types: [created]
11 pull_request_review_comment:
12 types: [created]
13 pull_request:
14 types: [synchronize]
158
16jobs:9jobs:
17 mark-inactivity:10 mark-inactivity:
18 name: Mark Issues/PRs without Activity11 name: Mark Issues/PRs without Activity
19 runs-on: ubuntu-latest12 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
23 steps:14 steps:
24 - name: Mark Issues/PRs without Activity15 - name: Mark Issues/PRs without Activity
@@ -53,8 +44,6 @@ jobs:
53 name: Mark Issues/PRs Awaiting User Response44 name: Mark Issues/PRs Awaiting User Response
54 runs-on: ubuntu-latest45 runs-on: ubuntu-latest
55 needs: mark-inactivity46 needs: mark-inactivity
56 # Only run this on the actual scheduled workflow
57 if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
5847
59 steps:48 steps:
60 - name: Mark Issues/PRs Awaiting User Response49 - name: Mark Issues/PRs Awaiting User Response
@@ -82,8 +71,6 @@ jobs:
82 name: Mark Issues with Alternative Exists71 name: Mark Issues with Alternative Exists
83 runs-on: ubuntu-latest72 runs-on: ubuntu-latest
84 needs: await-user-response73 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
88 steps:75 steps:
89 - name: Mark Issues with Alternative Exists76 - name: Mark Issues with Alternative Exists
@@ -106,20 +93,3 @@ jobs:
106 stale-issue-label: '🚏 Awaiting User Response'93 stale-issue-label: '🚏 Awaiting User Response'
107 close-issue-label: 'πŸ•ΈοΈ Inactive'94 close-issue-label: 'πŸ•ΈοΈ Inactive'
108 exempt-issue-labels: 'πŸ“Œ Keep Open'95 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 @@
1name: 🎯 Pull Request Auto Manager1name: 🎯 Pull Request Manager
22
3on:3on:
4 pull_request_target:4 pull_request_target:
5 types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed]5 types: [opened, synchronize, reopened, edited, labeled, unlabeled, closed]
6 pull_request_review_comment:
7 types: [created]
68
7jobs:9jobs:
8 check-merge-conflicts:10 check-merge-conflicts:
@@ -78,9 +80,26 @@ jobs:
78 configuration-path: .github/pr-auto-labels-by-files.yml80 configuration-path: .github/pr-auto-labels-by-files.yml
79 repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}81 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
81 check-merge-blocking-labels:100 check-merge-blocking-labels:
82 name: Check Merge Blocking Labels101 name: Check Merge Blocking Labels
83 needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files]102 needs: [check-merge-conflicts, label-by-branches]
84 runs-on: ubuntu-latest103 runs-on: ubuntu-latest
85104
86 steps:105 steps:
@@ -123,7 +142,7 @@ jobs:
123142
124 write-auto-comments:143 write-auto-comments:
125 name: Post PR Comments Based on Labels144 name: Post PR Comments Based on Labels
126 needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files]145 needs: [check-merge-conflicts, label-by-size, label-by-branches, label-by-files, remove-stale-label]
127 runs-on: ubuntu-latest146 runs-on: ubuntu-latest
128147
129 steps:148 steps: