Skip to content

Commit 3cdf7e5

Browse files
committed
chore: update workflow token for updating Node PR
1 parent 815311b commit 3cdf7e5

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/create-node-pr.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
dryRun:
1717
description: "Setting this to anything will run all the steps except opening the PR"
1818

19+
permissions:
20+
contents: write
21+
1922
jobs:
2023
create-pull-request:
2124
name: Create Node PR
@@ -47,13 +50,13 @@ jobs:
4750
- name: Checkout Node
4851
uses: actions/checkout@v3
4952
with:
50-
token: ${{ secrets.NODE_PULL_REQUEST_TOKEN }}
53+
token: ${{ secrets.NODE_PULL_REQUEST_TOKEN_V2 }}
5154
repository: nodejs/node
5255
fetch-depth: 0
5356
path: node
5457
- name: Create Node Pull Request
5558
env:
56-
GITHUB_TOKEN: ${{ secrets.NODE_PULL_REQUEST_TOKEN }}
59+
GITHUB_TOKEN: ${{ secrets.NODE_PULL_REQUEST_TOKEN_V2 }}
5760
run: |
5861
DRY_RUN=$([ -z "${{ inputs.dryRun }}" ] && echo "" || echo "--dry-run")
5962
node scripts/create-node-pr.js ${{ inputs.spec }} ${{ inputs.branch }} "$DRY_RUN"

scripts/template-oss/create-node-pr-yml.hbs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ on:
1414
dryRun:
1515
description: "Setting this to anything will run all the steps except opening the PR"
1616

17+
permissions:
18+
contents: write
19+
1720
jobs:
1821
create-pull-request:
1922
{{> jobYml jobName="Create Node PR" jobCheckout=(obj fetch-depth=0) }}
2023
- name: Checkout Node
2124
uses: actions/checkout@v3
2225
with:
23-
token: $\{{ secrets.NODE_PULL_REQUEST_TOKEN }}
26+
token: $\{{ secrets.NODE_PULL_REQUEST_TOKEN_V2 }}
2427
repository: nodejs/node
2528
fetch-depth: 0
2629
path: node
2730
- name: Create Node Pull Request
2831
env:
29-
GITHUB_TOKEN: $\{{ secrets.NODE_PULL_REQUEST_TOKEN }}
32+
GITHUB_TOKEN: $\{{ secrets.NODE_PULL_REQUEST_TOKEN_V2 }}
3033
run: |
3134
DRY_RUN=$([ -z "$\{{ inputs.dryRun }}" ] && echo "" || echo "--dry-run")
3235
node scripts/create-node-pr.js $\{{ inputs.spec }} $\{{ inputs.branch }} "$DRY_RUN"

0 commit comments

Comments
 (0)