From 55133eaa254bd1e0930d7117d2e97c3fdb294c92 Mon Sep 17 00:00:00 2001 From: Franco Meloni Date: Tue, 24 May 2022 06:20:58 -0700 Subject: [PATCH] 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 [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 --- .github/workflows/danger_pr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/danger_pr.yml b/.github/workflows/danger_pr.yml index 8d93b77c41014e..4cde18a216d7eb 100644 --- a/.github/workflows/danger_pr.yml +++ b/.github/workflows/danger_pr.yml @@ -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