Use pullbot token instead of GITHUB_TOKEN on the Danger Action (#33900)

Summary:
GITHUB_TOKEN doesn't have write permissions on forks, using the pullbot token instead.

https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Internal] - Use pullbot token instead of GITHUB_TOKEN on the Danger Action

Pull Request resolved: https://github.com/facebook/react-native/pull/33900

Test Plan: CI will validate it

Reviewed By: cipolleschi

Differential Revision: D36627043

Pulled By: f-meloni

fbshipit-source-id: bc7ff2f463c9d7cac61d362440858945edfbdbaf
This commit is contained in:
Franco Meloni
2022-05-24 06:20:58 -07:00
committed by Facebook GitHub Bot
parent 1ee7a0a67e
commit 55133eaa25
+3 -2
View File
@@ -12,7 +12,8 @@ jobs:
- run: yarn install
working-directory: bots
- name: Danger
run: yarn danger ci --use-github-checks --failOnErrors --id danger_pr
run: DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks --failOnErrors --id danger_pr
working-directory: bots
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLIC_PULLBOT_GITHUB_TOKEN_A: a6edf8e8d40ce4e8b11a
PUBLIC_PULLBOT_GITHUB_TOKEN_B: 150e1341f4dd9c944d2a