Skip to content

Commit 10197ce

Browse files
committed
build: clean-up workflows
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 1a40544 commit 10197ce

18 files changed

+57
-296
lines changed

.github/workflows/check_required_files.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ jobs:
7373
# Get list of added files:
7474
- name: 'Get list of added files'
7575
id: added-files
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
78+
PR_NUMBER: ${{ inputs.pull_request_number }}
7679
run: |
7780
page=1
7881
files=""
7982
while true; do
80-
new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN
81-
}}" "https://api.github.com/repos/stdlib-js/stdlib/pulls/${{ inputs.pull_request_number }}/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "added") | .filename')
83+
new_files=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/stdlib-js/stdlib/pulls/$PR_NUMBER/files?page=$page&per_page=100" | jq -r '.[] | select(.status == "added") | .filename')
8284
if [ -z "$new_files" ]; then
8385
break
8486
fi

.github/workflows/cleanup_coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# Delete the 'pr-<number>' branch from the 'stdlib-js/www-test-code-coverage' repository:
4444
- name: 'Delete coverage branch for PR'
4545
env:
46-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
46+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
4747
PR_NUMBER: ${{ github.event.pull_request.number }}
4848
run: |
4949
curl -X DELETE -H "Authorization: token $REPO_GITHUB_TOKEN" \
@@ -55,7 +55,7 @@ jobs:
5555
# Pin action to full length commit SHA
5656
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5757
with:
58-
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
58+
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
5959
script: |
6060
const prNumber = context.payload.pull_request.number;
6161
const { data: comments } = await github.rest.issues.listComments({

.github/workflows/deprecate_packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
# Deprecate the specified packages on npm and the respective GitHub repositories:
6262
- name: 'Deprecate packages'
6363
env:
64-
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
64+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
6565
run: |
6666
pkgs='${{ github.event.inputs.packages }}'
6767
npm_names=""

.github/workflows/git_note_amend_message.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ on:
5252
STDLIB_BOT_GITHUB_TOKEN:
5353
description: 'GitHub token for stdlib-bot'
5454
required: true
55-
REPO_GITHUB_TOKEN:
56-
description: 'GitHub token for accessing the repository'
57-
required: true
5855
STDLIB_BOT_GPG_PRIVATE_KEY:
5956
description: 'GPG private key for stdlib-bot'
6057
required: true
@@ -85,7 +82,10 @@ jobs:
8582
fetch-depth: 0
8683

8784
# Token for accessing the repository:
88-
token: ${{ secrets.REPO_GITHUB_TOKEN }}
85+
token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
86+
87+
# Avoid storing GitHub token in local Git configuration:
88+
persist-credentials: false
8989

9090
# Verify commit exists:
9191
- name: 'Verify commit exists'
@@ -130,7 +130,7 @@ jobs:
130130
# Commit and push changes:
131131
- name: 'Commit and push changes'
132132
env:
133-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
133+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
134134
USER_NAME: stdlib-bot
135135
run: |
136136
git config --local user.email "[email protected]"

.github/workflows/git_note_filter_packages.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ on:
5252
STDLIB_BOT_GITHUB_TOKEN:
5353
description: 'GitHub token for stdlib-bot'
5454
required: true
55-
REPO_GITHUB_TOKEN:
56-
description: 'GitHub token for accessing the repository'
57-
required: true
5855
STDLIB_BOT_GPG_PRIVATE_KEY:
5956
description: 'GPG private key for stdlib-bot'
6057
required: true
@@ -85,7 +82,10 @@ jobs:
8582
fetch-depth: 0
8683

8784
# Token for accessing the repository:
88-
token: ${{ secrets.REPO_GITHUB_TOKEN }}
85+
token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
86+
87+
# Avoid storing GitHub token in local Git configuration:
88+
persist-credentials: false
8989

9090
# Verify commit exists:
9191
- name: 'Verify commit exists'
@@ -139,7 +139,7 @@ jobs:
139139
# Commit and push changes:
140140
- name: 'Commit and push changes'
141141
env:
142-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
142+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
143143
USER_NAME: stdlib-bot
144144
run: |
145145
git config --local user.email "[email protected]"

.github/workflows/good_first_issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: 'Add comment'
5353
run: gh issue comment "$NUMBER" --body "$BODY"
5454
env:
55-
GH_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
55+
GH_TOKEN: ${{ secrets.STDLIB_BOT_FGPAT_PR_WRITE }}
5656
GH_REPO: ${{ github.repository }}
5757
NUMBER: ${{ github.event.issue.number }}
5858
BODY: |

.github/workflows/label_commands.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
# Pin action to full length commit SHA
5353
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
5454
with:
55-
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
55+
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
5656
script: |
5757
try {
5858
await github.rest.issues.removeLabel({
@@ -69,7 +69,7 @@ jobs:
6969
# Pin action to full length commit SHA
7070
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
7171
with:
72-
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
72+
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
7373
script: |
7474
github.rest.issues.addLabels({
7575
'owner': context.repo.owner,
@@ -83,7 +83,7 @@ jobs:
8383
run: |
8484
curl -X POST \
8585
-H "Accept: application/vnd.github.v3+json" \
86-
-H "Authorization: Bearer ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}" \
86+
-H "Authorization: Bearer ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}" \
8787
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/reactions" \
8888
-d '{"content":"eyes"}'
8989
@@ -106,7 +106,7 @@ jobs:
106106
pull_request_number: ${{ github.event.pull_request.number }}
107107
user: ${{ github.event.sender.login }}
108108
secrets:
109-
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
109+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
110110

111111
# Define a job for updating copyright header years:
112112
update_copyright_years:
@@ -126,8 +126,7 @@ jobs:
126126
with:
127127
pull_request_number: ${{ github.event.pull_request.number }}
128128
secrets:
129-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
130-
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
129+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
131130
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
132131
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
133132

@@ -149,8 +148,7 @@ jobs:
149148
with:
150149
pull_request_number: ${{ github.event.pull_request.number }}
151150
secrets:
152-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
153-
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
151+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
154152
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
155153
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
156154

@@ -172,8 +170,7 @@ jobs:
172170
with:
173171
pull_request_number: ${{ github.event.pull_request.number }}
174172
secrets:
175-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
176-
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
173+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
177174
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
178175
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
179176

@@ -195,8 +192,7 @@ jobs:
195192
with:
196193
pull_request_number: ${{ github.event.pull_request.number }}
197194
secrets:
198-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
199-
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
195+
STDLIB_BOT_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
200196
STDLIB_BOT_GPG_PRIVATE_KEY: ${{ secrets.STDLIB_BOT_GPG_PRIVATE_KEY }}
201197
STDLIB_BOT_GPG_PASSPHRASE: ${{ secrets.STDLIB_BOT_GPG_PASSPHRASE }}
202198

@@ -228,7 +224,7 @@ jobs:
228224
# Pin action to full length commit SHA
229225
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
230226
with:
231-
github-token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
227+
github-token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
232228
script: |
233229
try {
234230
await github.rest.issues.removeLabel({

.github/workflows/lint_autofix.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ on:
3636
STDLIB_BOT_GITHUB_TOKEN:
3737
description: 'GitHub token for stdlib-bot'
3838
required: true
39-
REPO_GITHUB_TOKEN:
40-
description: 'GitHub token for accessing the repository'
41-
required: true
4239
STDLIB_BOT_GPG_PRIVATE_KEY:
4340
description: 'GPG private key for stdlib-bot'
4441
required: true
@@ -93,7 +90,7 @@ jobs:
9390
repository: ${{ steps.pr-details.outputs.repository }}
9491

9592
# Token for accessing the repository:
96-
token: ${{ secrets.REPO_GITHUB_TOKEN }}
93+
token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
9794

9895
# File path to checkout to:
9996
path: './'
@@ -174,7 +171,7 @@ jobs:
174171
# Commit and push changes:
175172
- name: 'Commit and push changes'
176173
env:
177-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
174+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
178175
USER_NAME: stdlib-bot
179176
BRANCH_NAME: ${{ steps.pr-details.outputs.branch }}
180177
REPO_NAME: ${{ steps.pr-details.outputs.repository }}

.github/workflows/lint_random_files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ jobs:
397397
- name: 'Create sub-issue for C lint failures'
398398
if: ( github.event.inputs.c != 'false' ) && failure() && contains(steps.*.outcome, 'failure') && contains(steps.lint-c.outcome, 'failure')
399399
env:
400-
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
400+
GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
401401
run: |
402402
BODY_FILE="$GITHUB_WORKSPACE/lint_issue_body.md"
403403
@@ -476,7 +476,7 @@ jobs:
476476
commit-message: 'style: resolve lint errors'
477477
committer: 'stdlib-bot <[email protected]>'
478478
signoff: true
479-
token: ${{ secrets.PULL_REQUEST_TOKEN }}
479+
token: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }}
480480
labels: |
481481
automated-pr
482482
team-reviewers: |

.github/workflows/pr_merge_develop.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ name: pr_merge_develop
2121

2222
# Workflow triggers:
2323
on:
24-
2524
# Allow the workflow to be triggered by other workflows
2625
workflow_call:
2726
# Define the input parameters for the workflow:
@@ -36,9 +35,6 @@ on:
3635
STDLIB_BOT_GITHUB_TOKEN:
3736
description: 'GitHub token for stdlib-bot'
3837
required: true
39-
REPO_GITHUB_TOKEN:
40-
description: 'GitHub token for accessing the repository'
41-
required: true
4238
STDLIB_BOT_GPG_PRIVATE_KEY:
4339
description: 'GPG private key for stdlib-bot'
4440
required: true
@@ -82,7 +78,7 @@ jobs:
8278
with:
8379
ref: ${{ steps.pr-details.outputs.branch }}
8480
repository: ${{ steps.pr-details.outputs.repository }}
85-
token: ${{ secrets.REPO_GITHUB_TOKEN }}
81+
token: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
8682
fetch-depth: 0
8783

8884
# Disable Git hooks:
@@ -103,7 +99,7 @@ jobs:
10399
# Merge the develop branch into the PR branch:
104100
- name: 'Merge develop branch'
105101
env:
106-
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
102+
REPO_GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_GITHUB_TOKEN }}
107103
USER_NAME: stdlib-bot
108104
BRANCH_NAME: ${{ steps.pr-details.outputs.branch }}
109105
REPO_NAME: ${{ steps.pr-details.outputs.repository }}

0 commit comments

Comments
 (0)