From 37d1e8e7a06d00a212bbf95ddc70ec106ea11b23 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 17 Jul 2024 03:27:12 -0700 Subject: [PATCH] Act as @react-native-bot on all the actions (#45480) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45480 We currently use the default GITHUB_ACTION which makes a lot of interaction appear as user "GitHub Actions". Instead we could use the `REACT_NATIVE_BOT_GITHUB_TOKEN` which we have as secret so the bot will actually perform the actions. Changelog: [Internal] [Changed] - Act as react-native-bot on all the actions Reviewed By: cipolleschi Differential Revision: D59815201 fbshipit-source-id: 702b121ec07d0db10abf25e23f7ddf5658dd5d62 --- .github/actions/lint/action.yml | 2 +- .github/workflows/autorebase.yml | 2 +- .github/workflows/check-for-reproducer.yml | 2 +- .github/workflows/close-pr.yml | 2 +- .github/workflows/danger-pr.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml index bfec4d5814a..667b990029b 100644 --- a/.github/actions/lint/action.yml +++ b/.github/actions/lint/action.yml @@ -22,7 +22,7 @@ runs: shell: bash run: yarn lint-ci env: - GITHUB_TOKEN: ${{ inputs.github-token}} + GITHUB_TOKEN: ${{ inputs.github-token }} - name: Lint code shell: bash run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml diff --git a/.github/workflows/autorebase.yml b/.github/workflows/autorebase.yml index 62fd97caf1a..447e7dc5ece 100644 --- a/.github/workflows/autorebase.yml +++ b/.github/workflows/autorebase.yml @@ -24,4 +24,4 @@ jobs: - name: Automatic Rebase uses: cirrus-actions/rebase@1.8 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/check-for-reproducer.yml b/.github/workflows/check-for-reproducer.yml index 839416620f6..5d124c32787 100644 --- a/.github/workflows/check-for-reproducer.yml +++ b/.github/workflows/check-for-reproducer.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/github-script@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }} script: | const checkForReproducer = require('./.github/workflow-scripts/checkForReproducer.js') await checkForReproducer(github, context) diff --git a/.github/workflows/close-pr.yml b/.github/workflows/close-pr.yml index 40bc92fe59c..2b3d773fa99 100644 --- a/.github/workflows/close-pr.yml +++ b/.github/workflows/close-pr.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/github-script@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }} script: | if(!context.payload.commits || !context.payload.commits.length) return; const sha = context.payload.commits[0].id; diff --git a/.github/workflows/danger-pr.yml b/.github/workflows/danger-pr.yml index cfde1743524..6d0bd162270 100644 --- a/.github/workflows/danger-pr.yml +++ b/.github/workflows/danger-pr.yml @@ -25,4 +25,4 @@ jobs: run: yarn danger ci --use-github-checks --failOnErrors working-directory: packages/react-native-bots env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DANGER_GITHUB_API_TOKEN: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}