@@ -151,7 +151,7 @@ jobs:
151
151
id : changed-directories
152
152
continue-on-error : true
153
153
env :
154
- STDLIB_BOT_GITHUB_TOKEN : ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
154
+ STDLIB_BOT_GITHUB_TOKEN : ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }}
155
155
run : |
156
156
if [ -n "${{ github.event.pull_request.number }}" ]; then
157
157
# Get the list of changed files in pull request:
@@ -185,6 +185,18 @@ jobs:
185
185
echo "directories=${{ github.event.inputs.directories }}" >> $GITHUB_OUTPUT
186
186
timeout-minutes : 5
187
187
188
+ # Exit early if non-package directories are changed:
189
+ - name : ' Exit early if non-package directories are changed'
190
+ if : github.event_name != 'workflow_dispatch'
191
+ run : |
192
+ directories="${{ steps.changed-directories.outputs.directories }}"
193
+ for directory in $directories; do
194
+ if [[ "$directory" != "lib/node_modules/@stdlib"* ]]; then
195
+ echo "Error: changed directory '$directory' is not in 'lib/node_modules/@stdlib'."
196
+ exit 1
197
+ fi
198
+ done
199
+
188
200
# Run JavaScript tests:
189
201
- name : ' Run JavaScript tests'
190
202
id : extract-coverage
@@ -236,7 +248,7 @@ jobs:
236
248
# Pin action to full length commit SHA
237
249
uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
238
250
with :
239
- github-token : ${{ secrets.CHATBOT_GITHUB_TOKEN }}
251
+ github-token : ${{ secrets.STDLIB_BOT_FGPAT_REPO_WRITE }}
240
252
script : |
241
253
const { data: comments } = await github.rest.issues.listComments({
242
254
'issue_number': context.issue.number,
@@ -267,7 +279,7 @@ jobs:
267
279
# Pin action to full length commit SHA
268
280
uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
269
281
with :
270
- github-token : ${{ secrets.CHATBOT_GITHUB_TOKEN }}
282
+ github-token : ${{ secrets.STDLIB_BOT_FGPAT_REPO_WRITE }}
271
283
script : |
272
284
github.rest.repos.createCommitComment({
273
285
'commit_sha': context.sha,
@@ -294,7 +306,7 @@ jobs:
294
306
fetch-depth : 1
295
307
296
308
# Token for accessing the repository:
297
- token : ${{ secrets.REPO_GITHUB_TOKEN }}
309
+ token : ${{ secrets.STDLIB_BOT_FGPAT_REPO_READ }}
298
310
299
311
# Checkout coverage repository branch:
300
312
- name : ' Checkout coverage repository branch'
@@ -346,7 +358,7 @@ jobs:
346
358
# Commit and push changes:
347
359
- name : ' Commit and push changes'
348
360
env :
349
- REPO_GITHUB_TOKEN : ${{ secrets.REPO_GITHUB_TOKEN }}
361
+ REPO_GITHUB_TOKEN : ${{ secrets.STDLIB_BOT_FGPAT_REPO_WRITE }}
350
362
USER_NAME : stdlib-bot
351
363
run : |
352
364
cd ./www-test-code-coverage
0 commit comments