Workflows Switch all to use app token/app for any PR/issue labeling/commenting action (#4624) * ci: switch workflows to use app token/app id authentication * That wasn't supposed to go in this PR * chore: refactor to local token minting step [Test] * chore: expose token output from setup-app-token action and add PR checkout step * ci: replace checkout and custom app token with create-github-app-token action in PR merge conflict workflow * ci: add test label action to PR conflict check workflow * another test... * I am losing my sanity * can this work now? please? This action adds my debug level? * it needs to run always * let's do it via curl...? * why did it (totally not me) remove the always() again * Sorry I screamed at you, Qwen. Does this work? * refactor: consolidate GitHub App token creation into individual jobs * chore: remove debug label functionality from merge conflict workflow * chore: let's figure out why labeler is not behaving * chore: remove temporary GitHub API token validation check from PR workflow * ci: ensure workflow jobs run regardless of previous job failures by adding if: always()

806726d737efc190f4997e057707defe94ff3dc2

Wolfsblvt <wolfsblvt@gmail.com>

Signed
7 files changed, +220 -56Ignore whitespace
.github/workflows/issues-auto-manager.yml+54 -9
@@ -15,8 +15,19 @@ jobs:
1515 label-on-content:
1616 name: 🏷️ Label Issues by Content
1717 runs-on: ubuntu-latest
18+ if: always()
1819
1920 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2031 - name: Checkout Repository
2132 # Checkout
2233 # https://github.com/marketplace/actions/checkout
@@ -32,13 +43,25 @@ jobs:
3243 with:
3344 configuration-path: .github/issues-auto-labels.yml
3445 enable-versioned-regex: 0
3546 repo-token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
3647
3748 label-on-labels:
3849 name: 🏷️ Label Issues by Labels
50+ needs: [label-on-content]
3951 runs-on: ubuntu-latest
52+ if: always()
4053
4154 steps:
55+ - name: Mint App Token
56+ id: app
57+ # Create a GitHub App token
58+ # https://github.com/marketplace/actions/create-github-app-token
59+ uses: actions/create-github-app-token@v2
60+ with:
61+ app-id: ${{ vars.ST_BOT_APP_ID }}
62+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
63+ owner: ${{ github.repository_owner }}
64+
4265 - name: βœ… Add "πŸ‘ Approved" for relevant labels
4366 if: contains(fromJSON('["πŸ‘©β€πŸ’» Good First Issue", "πŸ™ Help Wanted", "πŸͺ² Confirmed", "⚠️ High Priority", "❕ Medium Priority", "πŸ’€ Low Priority"]'), github.event.label.name)
4467 # πŸ€– Issues Helper
@@ -46,7 +69,7 @@ jobs:
4669 uses: actions-cool/issues-helper@v3.6.0
4770 with:
4871 actions: 'add-labels'
4972 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
5073 labels: 'πŸ‘ Approved'
5174
5275 - name: ❌ Remove progress labels when issue is marked done or stale
@@ -56,7 +79,7 @@ jobs:
5679 uses: actions-cool/issues-helper@v3.6.0
5780 with:
5881 actions: 'remove-labels'
5982 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
6083 labels: 'πŸ§‘β€πŸ’» In Progress,πŸ€” Unsure,πŸ€” Under Consideration'
6184
6285 - name: ❌ Remove temporary labels when confirmed labels are added
@@ -66,7 +89,7 @@ jobs:
6689 uses: actions-cool/issues-helper@v3.6.0
6790 with:
6891 actions: 'remove-labels'
6992 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
7093 labels: 'πŸ€” Unsure,πŸ€” Under Consideration'
7194
7295 - name: ❌ Remove no bug labels when "πŸͺ² Confirmed" is added
@@ -76,32 +99,54 @@ jobs:
7699 uses: actions-cool/issues-helper@v3.6.0
77100 with:
78101 actions: 'remove-labels'
79102 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
80103 labels: 'βœ–οΈ Not Reproducible,βœ–οΈ Not A Bug'
81104
82105 remove-stale-label:
83106 name: πŸ—‘οΈ Remove Stale Label on Comment
107+ needs: [label-on-content, label-on-labels]
84108 runs-on: ubuntu-latest
85109 # Only run this on new comments, to automatically remove the stale label
86110 if: always() && (github.event_name == 'issue_comment' && github.actor != 'github-actions[bot]')
87111
88112 steps:
113+ - name: Mint App Token
114+ id: app
115+ # Create a GitHub App token
116+ # https://github.com/marketplace/actions/create-github-app-token
117+ uses: actions/create-github-app-token@v2
118+ with:
119+ app-id: ${{ vars.ST_BOT_APP_ID }}
120+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
121+ owner: ${{ github.repository_owner }}
122+
89123 - name: Remove Stale Label
90124 # πŸ€– Issues Helper
91125 # https://github.com/marketplace/actions/issues-helper
92126 uses: actions-cool/issues-helper@v3.6.0
93127 with:
94128 actions: 'remove-labels'
95129 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
96130 issue-number: ${{ github.event.issue.number }}
97131 labels: '⚰️ Stale,πŸ•ΈοΈ Inactive,🚏 Awaiting User Response,πŸ›‘ No Response'
98132
99133 write-auto-comments:
100134 name: πŸ’¬ Post Issue Comments Based on Labels
101135 needs: [label-on-content, label-on-labels, remove-stale-label]
102136 runs-on: ubuntu-latest
137+ if: always()
103138
104139 steps:
140+ - name: Mint App Token
141+ id: app
142+ # Create a GitHub App token
143+ # https://github.com/marketplace/actions/create-github-app-token
144+ uses: actions/create-github-app-token@v2
145+ with:
146+ app-id: ${{ vars.ST_BOT_APP_ID }}
147+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
148+ owner: ${{ github.repository_owner }}
149+
105150 - name: Checkout Repository
106151 # Checkout
107152 # https://github.com/marketplace/actions/checkout
@@ -113,4 +158,4 @@ jobs:
113158 uses: peaceiris/actions-label-commenter@v1.10.0
114159 with:
115160 config_file: .github/issues-auto-comments.yml
116161 github_token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
.github/workflows/issues-updates-on-merge.yml+12 -1
@@ -15,8 +15,19 @@ jobs:
1515 update-linked-issues:
1616 name: πŸ”— Mark Linked Issues Done on Push
1717 runs-on: ubuntu-latest
18+ if: always()
1819
1920 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2031 - name: Checkout Repository
2132 # Checkout
2233 # https://github.com/marketplace/actions/checkout
@@ -31,7 +42,7 @@ jobs:
3142 - name: Label Linked Issues
3243 id: label_linked_issues
3344 env:
3445 GH_TOKEN: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
3546 run: |
3647 for ISSUE in $(echo $issues | jq -r '.[]'); do
3748 if [ "${{ github.ref }}" == "refs/heads/staging" ]; then
.github/workflows/job-close-stale.yml+38 -5
@@ -15,14 +15,25 @@ jobs:
1515 mark-inactivity:
1616 name: ⏳ Mark Issues/PRs without Activity
1717 runs-on: ubuntu-latest
18+ if: always()
1819
1920 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2031 - name: Mark Issues/PRs without Activity
2132 # Close Stale Issues and PRs
2233 # https://github.com/marketplace/actions/close-stale-issues
2334 uses: actions/stale@v9.1.0
2435 with:
2536 repo-token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
2637 days-before-stale: 183
2738 days-before-close: 7
2839 operations-per-run: 30
@@ -47,16 +58,27 @@ jobs:
4758
4859 await-user-response:
4960 name: ⚠️ Mark Issues/PRs Awaiting User Response
61+ needs: [mark-inactivity]
5062 runs-on: ubuntu-latest
51- needs: mark-inactivity
63+ if: always()
5264
5365 steps:
66+ - name: Mint App Token
67+ id: app
68+ # Create a GitHub App token
69+ # https://github.com/marketplace/actions/create-github-app-token
70+ uses: actions/create-github-app-token@v2
71+ with:
72+ app-id: ${{ vars.ST_BOT_APP_ID }}
73+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
74+ owner: ${{ github.repository_owner }}
75+
5476 - name: Mark Issues/PRs Awaiting User Response
5577 # Close Stale Issues and PRs
5678 # https://github.com/marketplace/actions/close-stale-issues
5779 uses: actions/stale@v9.1.0
5880 with:
5981 repo-token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
6082 days-before-stale: 7
6183 days-before-close: 7
6284 operations-per-run: 30
@@ -74,16 +96,27 @@ jobs:
7496
7597 alternative-exists:
7698 name: πŸ”„ Mark Issues with Alternative Exists
99+ needs: [mark-inactivity, await-user-response]
77100 runs-on: ubuntu-latest
78- needs: await-user-response
101+ if: always()
79102
80103 steps:
104+ - name: Mint App Token
105+ id: app
106+ # Create a GitHub App token
107+ # https://github.com/marketplace/actions/create-github-app-token
108+ uses: actions/create-github-app-token@v2
109+ with:
110+ app-id: ${{ vars.ST_BOT_APP_ID }}
111+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
112+ owner: ${{ github.repository_owner }}
113+
81114 - name: Mark Issues with Alternative Exists
82115 # Close Stale Issues and PRs
83116 # https://github.com/marketplace/actions/close-stale-issues
84117 uses: actions/stale@v9.1.0
85118 with:
86119 repo-token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
87120 days-before-stale: 7
88121 days-before-close: 7
89122 operations-per-run: 30
.github/workflows/on-close-handler.yml+12 -1
@@ -15,14 +15,25 @@ jobs:
1515 remove-labels:
1616 name: πŸ—‘οΈ Remove Pending Labels on Close
1717 runs-on: ubuntu-latest
18+ if: always()
1819
1920 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2031 - name: Remove Pending Labels on Close
2132 # πŸ€– Issues Helper
2233 # https://github.com/marketplace/actions/issues-helper
2334 uses: actions-cool/issues-helper@v3.6.0
2435 with:
2536 actions: remove-labels
2637 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
2738 issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
2839 labels: '🚏 Awaiting User Response,πŸ§‘β€πŸ’» In Progress,πŸ“Œ Keep Open,🚫 Merge Conflicts,πŸ”¬ Needs Testing,πŸ”¨ Needs Work,⚰️ Stale,β›” Waiting For External/Upstream'
.github/workflows/on-open-handler.yml+12 -2
@@ -15,15 +15,25 @@ jobs:
1515 label-maintainer:
1616 name: 🏷️ Label if Author is a Repo Maintainer
1717 runs-on: ubuntu-latest
1818 if: always() && contains(fromJson('["Cohee1207", "RossAscends", "Wolfsblvt"]'), github.actor)
1919
2020 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2131 - name: Label if Author is a Repo Maintainer
2232 # πŸ€– Issues Helper
2333 # https://github.com/marketplace/actions/issues-helper
2434 uses: actions-cool/issues-helper@v3.6.0
2535 with:
2636 actions: 'add-labels'
2737 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
2838 issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
2939 labels: 'πŸ‘· Maintainer'
.github/workflows/pr-auto-manager.yml+80 -37
@@ -12,30 +12,11 @@ permissions:
1212 pull-requests: write
1313
1414jobs:
15- app-auth:
16- name: πŸ”‘ Mint App token
17- runs-on: ubuntu-latest
18- if: always()
19-
20- outputs:
21- app_token: ${{ steps.app.outputs.token }}
22-
23- steps:
24- - name: Create GitHub App Token
25- # Create a GitHub App token
26- # https://github.com/marketplace/actions/create-github-app-token
27- uses: actions/create-github-app-token@v2
28- id: app
29- with:
30- app-id: ${{ vars.ST_BOT_APP_ID }}
31- private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
32- owner: ${{ github.repository_owner }}
33-
3415 run-eslint:
3516 name: βœ… Check ESLint on PR
3617 runs-on: ubuntu-latest
3718 # Only needs to run when code is changed
3819 if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
3920
4021 # Override permissions, linter likely needs write access to issues
4122 permissions:
@@ -67,7 +48,7 @@ jobs:
6748 # https://github.com/marketplace/actions/action-eslint
6849 uses: sibiraj-s/action-eslint@v3.0.1
6950 with:
7051 token: ${{ secrets.GITHUB_TOKEN }} # ESLint can run with the original permissions
7152 eslint-args: '--ignore-path=.gitignore --quiet'
7253 extensions: 'js'
7354 annotations: true
@@ -78,7 +59,7 @@ jobs:
7859 label-by-size:
7960 name: 🏷️ Label PR by Size
8061 # This job should run after all others, to prevent possible concurrency issues
8162 needs: [app-auth, label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels, write-auto-comments]
8263 runs-on: ubuntu-latest
8364 # Only needs to run when code is changed
8465 if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
@@ -90,12 +71,22 @@ jobs:
9071 pull-requests: write
9172
9273 steps:
74+ - name: Mint App Token
75+ id: app
76+ # Create a GitHub App token
77+ # https://github.com/marketplace/actions/create-github-app-token
78+ uses: actions/create-github-app-token@v2
79+ with:
80+ app-id: ${{ vars.ST_BOT_APP_ID }}
81+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
82+ owner: ${{ github.repository_owner }}
83+
9384 - name: Label PR Size
9485 # Pull Request Size Labeler
9586 # https://github.com/marketplace/actions/pull-request-size-labeler
9687 uses: codelytv/pr-size-labeler@v1.10.2
9788 with:
9889 GITHUB_TOKEN: ${{ needssteps.app-auth.outputs.app_tokentoken }}
9990 xs_label: '🟩 ⬀○○○○'
10091 xs_max_size: '20'
10192 s_label: '🟩 ⬀⬀○○○'
@@ -112,12 +103,21 @@ jobs:
112103
113104 label-by-branches:
114105 name: 🏷️ Label PR by Branches
115- needs: [app-auth]
116106 runs-on: ubuntu-latest
117107 # Only label once when PR is created or when base branch is changed, to allow manual label removal
118108 if: always() && (github.event.action == 'opened' || (github.event.action == 'synchronize' && github.event.changes.base))
119109
120110 steps:
111+ - name: Mint App Token
112+ id: app
113+ # Create a GitHub App token
114+ # https://github.com/marketplace/actions/create-github-app-token
115+ uses: actions/create-github-app-token@v2
116+ with:
117+ app-id: ${{ vars.ST_BOT_APP_ID }}
118+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
119+ owner: ${{ github.repository_owner }}
120+
121121 - name: Checkout Repository
122122 # Checkout
123123 # https://github.com/marketplace/actions/checkout
@@ -129,16 +129,26 @@ jobs:
129129 uses: actions/labeler@v5.0.0
130130 with:
131131 configuration-path: .github/pr-auto-labels-by-branch.yml
132132 repo-token: ${{ needssteps.app-auth.outputs.app_tokentoken }}
133133
134134 label-by-files:
135135 name: 🏷️ Label PR by Files
136136 needs: [applabel-authby-branches]
137137 runs-on: ubuntu-latest
138138 # Only needs to run when code is changed
139139 if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
140140
141141 steps:
142+ - name: Mint App Token
143+ id: app
144+ # Create a GitHub App token
145+ # https://github.com/marketplace/actions/create-github-app-token
146+ uses: actions/create-github-app-token@v2
147+ with:
148+ app-id: ${{ vars.ST_BOT_APP_ID }}
149+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
150+ owner: ${{ github.repository_owner }}
151+
142152 - name: Checkout Repository
143153 # Checkout
144154 # https://github.com/marketplace/actions/checkout
@@ -148,15 +158,18 @@ jobs:
148158 # Pull Request Labeler
149159 # https://github.com/marketplace/actions/labeler
150160 uses: actions/labeler@v5.0.0
161+ env:
162+ GITHUB_TOKEN: ${{ steps.app.outputs.token }} # labeler action needs some handholding
151163 with:
152164 configuration-path: .github/pr-auto-labels-by-files.yml
153165 repo-token: ${{ needssteps.app-auth.outputs.app_tokentoken }}
154166
155167 remove-stale-label:
156168 name: πŸ—‘οΈ Remove Stale Label on Comment
169+ needs: [label-by-branches, label-by-files]
157170 runs-on: ubuntu-latest
158171 # Only runs on comments not done by the github actions bot
159172 if: always() && (github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]')
160173
161174 # Override permissions, issue labeler needs issues write access
162175 permissions:
@@ -165,19 +178,29 @@ jobs:
165178 pull-requests: write
166179
167180 steps:
181+ - name: Mint App Token
182+ id: app
183+ # Create a GitHub App token
184+ # https://github.com/marketplace/actions/create-github-app-token
185+ uses: actions/create-github-app-token@v2
186+ with:
187+ app-id: ${{ vars.ST_BOT_APP_ID }}
188+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
189+ owner: ${{ github.repository_owner }}
190+
168191 - name: Remove Stale Label
169192 # πŸ€– Issues Helper
170193 # https://github.com/marketplace/actions/issues-helper
171194 uses: actions-cool/issues-helper@v3.6.0
172195 with:
173196 actions: 'remove-labels'
174197 token: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
175198 issue-number: ${{ github.event.pull_request.number }}
176199 labels: '⚰️ Stale'
177200
178201 check-merge-blocking-labels:
179202 name: 🚫 Check Merge Blocking Labels
180203 needs: [label-by-branches, label-by-files, remove-stale-label]
181204 runs-on: ubuntu-latest
182205 # Run, even if the previous jobs were skipped/failed
183206 if: always()
@@ -227,12 +250,22 @@ jobs:
227250
228251 write-auto-comments:
229252 name: πŸ’¬ Post PR Comments Based on Labels
230253 needs: [label-by-branches, label-by-files, remove-stale-label, check-merge-blocking-labels]
231254 runs-on: ubuntu-latest
232255 # Run, even if the previous jobs were skipped/failed
233256 if: always()
234257
235258 steps:
259+ - name: Mint App Token
260+ id: app
261+ # Create a GitHub App token
262+ # https://github.com/marketplace/actions/create-github-app-token
263+ uses: actions/create-github-app-token@v2
264+ with:
265+ app-id: ${{ vars.ST_BOT_APP_ID }}
266+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
267+ owner: ${{ github.repository_owner }}
268+
236269 - name: Checkout Repository
237270 # Checkout
238271 # https://github.com/marketplace/actions/checkout
@@ -244,13 +277,13 @@ jobs:
244277 uses: peaceiris/actions-label-commenter@v1.10.0
245278 with:
246279 config_file: .github/pr-auto-comments.yml
247280 github_token: ${{ secretssteps.GITHUB_TOKENapp.outputs.token }}
248281
249282 # This runs on merged PRs to staging, reading the PR body and directly linked issues. Check `issues-updates-on-merge.yml`:`update-linked-issues` for commit-based updates.
250283 update-linked-issues:
251284 name: πŸ”— Mark Linked Issues Done on Staging Merge
252285 runs-on: ubuntu-latest
253286 if: always() && (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'staging')
254287
255288 # Override permissions, We need to be able to write to issues
256289 permissions:
@@ -259,6 +292,16 @@ jobs:
259292 pull-requests: write
260293
261294 steps:
295+ - name: Mint App Token
296+ id: app
297+ # Create a GitHub App token
298+ # https://github.com/marketplace/actions/create-github-app-token
299+ uses: actions/create-github-app-token@v2
300+ with:
301+ app-id: ${{ vars.ST_BOT_APP_ID }}
302+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
303+ owner: ${{ github.repository_owner }}
304+
262305 - name: Extract Linked Issues From PR Description
263306 id: extract_issues
264307 run: |
@@ -271,7 +314,7 @@ jobs:
271314 PR_NUMBER=${{ github.event.pull_request.number }}
272315 REPO=${{ github.repository }}
273316 API_URL="https://api.github.com/repos/$REPO/pulls/$PR_NUMBER/issues"
274317 ISSUES=$(curl -s -H "Authorization: token ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}" "$API_URL" | jq -r '.[].number' | jq -R -s -c 'split("\n")[:-1]')
275318 echo "linked_issues=$ISSUES" >> $GITHUB_ENV
276319
277320 - name: Merge Issue Lists
@@ -283,7 +326,7 @@ jobs:
283326 - name: Label Linked Issues
284327 id: label_linked_issues
285328 env:
286329 GH_TOKEN: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
287330 run: |
288331 for ISSUE in $(echo $final_issues | jq -r '.[]'); do
289332 gh issue edit $ISSUE -R ${{ github.repository }} --add-label "βœ… Done (staging)" --remove-label "πŸ§‘β€πŸ’» In Progress"
.github/workflows/pr-check-merge-conflicts.yaml+12 -1
@@ -15,14 +15,25 @@ jobs:
1515 check-merge-conflicts:
1616 name: βš”οΈ Check Merge Conflicts
1717 runs-on: ubuntu-latest
18+ if: always()
1819
1920 steps:
21+ - name: Mint App Token
22+ id: app
23+ # Create a GitHub App token
24+ # https://github.com/marketplace/actions/create-github-app-token
25+ uses: actions/create-github-app-token@v2
26+ with:
27+ app-id: ${{ vars.ST_BOT_APP_ID }}
28+ private-key: ${{ secrets.ST_BOT_PRIVATE_KEY }}
29+ owner: ${{ github.repository_owner }}
30+
2031 - name: Check Merge Conflicts
2132 # Label Conflicting Pull Requests
2233 # https://github.com/marketplace/actions/label-conflicting-pull-requests
2334 uses: eps1lon/actions-label-merge-conflict@v3.0.3
2435 with:
2536 dirtyLabel: '🚫 Merge Conflicts'
2637 repoToken: ${{ secretssteps.ISSUES_BOT_TOKENapp.outputs.token }}
2738 commentOnDirty: >
2839 ⚠️ This PR has conflicts that need to be resolved before it can be merged.