Skip to content

Commit 97027ae

Browse files
chore: remove GitHub PAT token usage (#3611)
1 parent d2b3bae commit 97027ae

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

.github/workflows/linear-pr-integration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
with:
1515
pull_number: ${{ github.event.pull_request.number }}
1616
linear_api_key: ${{ secrets.LINEAR_TOKEN }}
17-
github_token: ${{ secrets.REPO_TOKEN }}
17+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-validate-changesets.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
ref: ${{ github.event.client_payload.ref }}
24-
# workaround to ensure changeset file is pushed with REPO_TOKEN owner's account
25-
# see https://github.com/changesets/action/issues/70
26-
persist-credentials: false
2724

2825
- name: Get PR's changeset file
2926
run: |
@@ -51,7 +48,7 @@ jobs:
5148
run: |
5249
echo "machine github.com" > $HOME/.netrc
5350
echo "login github-actions[bot]" >> $HOME/.netrc
54-
echo "password ${{ secrets.REPO_TOKEN }}" >> $HOME/.netrc
51+
echo "password ${{ secrets.GITHUB_TOKEN }}" >> $HOME/.netrc
5552
chmod 600 $HOME/.netrc
5653
5754
- name: Commit Changeset
@@ -63,7 +60,7 @@ jobs:
6360
git commit -m "build: update dependency changeset"
6461
git push origin HEAD:${{ github.event.pull_request.head.ref }}
6562
env:
66-
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6764

6865
validate-changeset:
6966
name: Validate PR Changeset

.github/workflows/release.yaml

+5-8
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626
ref: ${{ github.event.pull_request.head.ref }}
27-
# workaround to ensure force pushes to changeset branch use REPO_TOKEN owner's account
28-
# see https://github.com/changesets/action/issues/70
29-
persist-credentials: false
3027

3128
- name: CI Setup
3229
uses: ./.github/actions/ci-setup
@@ -76,13 +73,13 @@ jobs:
7673
githubReleaseName: ${{ env.RELEASE_VERSION }}
7774
githubTagName: ${{ env.RELEASE_VERSION }}
7875
env:
79-
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8077
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8178

8279
- name: Prettify changelog
8380
run: pnpm changeset:update-changelog
8481
env:
85-
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8683
RELEASE_TAG: ${{ env.RELEASE_VERSION }}
8784
PUBLISHED: ${{ steps.changesets.outputs.published }}
8885
REF_NAME: ${{ github.ref_name }}
@@ -129,7 +126,7 @@ jobs:
129126
workflow: update-nightly.yml
130127
ref: master
131128
repo: FuelLabs/docs-hub
132-
token: ${{ secrets.REPO_TOKEN }}
129+
token: ${{ secrets.GITHUB_TOKEN }}
133130

134131
- name: Create PR to apply latest release to master
135132
if: steps.changesets.outputs.published == 'true' && startsWith(github.ref_name, 'release/') && env.RELEASE_VERSION_HIGHER_THAN_LATEST == 'true'
@@ -145,7 +142,7 @@ jobs:
145142
146143
gh pr create -B master -H $GITHUB_REF_NAME --title "$PR_TITLE" --body "$PR_BODY"
147144
env:
148-
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
145+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149146
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
150147
LATEST_VERSION: ${{ env.LATEST_VERSION }}
151148

@@ -155,7 +152,7 @@ jobs:
155152
if: steps.changesets.outputs.published == 'true' && startsWith(github.ref_name, 'release/') && env.RELEASE_VERSION_HIGHER_THAN_LATEST == 'false'
156153
run: git push origin --delete ${{ github.ref_name }}
157154
env:
158-
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
155+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
159156

160157
# Upload assets to S3
161158
- uses: unfor19/[email protected]

0 commit comments

Comments
 (0)