Skip to content

Commit 573734f

Browse files
cortinicofacebook-github-bot
authored andcommitted
Remove PAT_TOKEN and PAT_USERNAME from CircleCI (#35808)
Summary: This is a cleanup change needed after the CircleCI security incident. We should be using the `Authorization: Bearer` header to trigger `rn-diff-purge` instead of using username & password authentication. Source: https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event ## Changelog [INTERNAL] - Remove PAT_TOKEN and PAT_USERNAME from CircleCI Pull Request resolved: #35808 Test Plan: I've tested this locally with: ``` curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \ -H "Accept: application/vnd.github.v3+json" \ -H "Authorization: Bearer [...]" \ -d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"test.test.test\" }}" ``` and the run was succesfully fired by react-native-bot: https://github.com/react-native-community/rn-diff-purge/actions/runs/3894079133 Reviewed By: lunaleaps Differential Revision: D42456065 Pulled By: cortinico fbshipit-source-id: 475e9ca80760522cc08bad37d85c5af6727922d3
1 parent 7324c22 commit 573734f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ jobs:
15561556
command: |
15571557
curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \
15581558
-H "Accept: application/vnd.github.v3+json" \
1559-
-u "$PAT_USERNAME:$PAT_TOKEN" \
1559+
-H "Authorization: Bearer $REACT_NATIVE_BOT_GITHUB_TOKEN" \
15601560
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
15611561
# END: Stable releases
15621562

0 commit comments

Comments
 (0)