From 8dcc28f59f3d38ebb96b358d238e3eb6b766540f Mon Sep 17 00:00:00 2001 From: Liz Baker Date: Tue, 20 Feb 2024 09:11:13 -0800 Subject: [PATCH 1/2] fix: Try github token for api call --- .github/workflows/trigger-i18n-merge.yml | 1 + scripts/actions/trigger-i18n-merge.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger-i18n-merge.yml b/.github/workflows/trigger-i18n-merge.yml index 3a3d5da504e..8d95b216acc 100644 --- a/.github/workflows/trigger-i18n-merge.yml +++ b/.github/workflows/trigger-i18n-merge.yml @@ -33,6 +33,7 @@ jobs: - name: Check for modified files & merge env: OPENSOURCE_BOT_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SOURCE_REF: ${{ github.ref }} run: | URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/files" diff --git a/scripts/actions/trigger-i18n-merge.js b/scripts/actions/trigger-i18n-merge.js index ad47c41af19..7503d889f3a 100644 --- a/scripts/actions/trigger-i18n-merge.js +++ b/scripts/actions/trigger-i18n-merge.js @@ -65,7 +65,7 @@ const main = async () => { if (url) { const prFileData = await fetchPaginatedGHResults( url, - process.env.OPENSOURCE_BOT_TOKEN + process.env.GITHUB_TOKEN ); const sitesToBuild = getSitesToBuild(prFileData); From 746dd75d97b425e84ec958e590065af73e05c4a1 Mon Sep 17 00:00:00 2001 From: Liz Baker Date: Tue, 20 Feb 2024 14:05:20 -0800 Subject: [PATCH 2/2] fix: Use the right token --- .github/workflows/trigger-i18n-merge.yml | 3 +-- scripts/actions/trigger-i18n-merge.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger-i18n-merge.yml b/.github/workflows/trigger-i18n-merge.yml index 8d95b216acc..87808ac5df6 100644 --- a/.github/workflows/trigger-i18n-merge.yml +++ b/.github/workflows/trigger-i18n-merge.yml @@ -32,8 +32,7 @@ jobs: - name: Check for modified files & merge env: - OPENSOURCE_BOT_TOKEN: ${{ secrets.OPENSOURCE_BOT_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DEVEX_OPENSOURCE_BOT_TOKEN }} SOURCE_REF: ${{ github.ref }} run: | URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/files" diff --git a/scripts/actions/trigger-i18n-merge.js b/scripts/actions/trigger-i18n-merge.js index 7503d889f3a..aef8a77894a 100644 --- a/scripts/actions/trigger-i18n-merge.js +++ b/scripts/actions/trigger-i18n-merge.js @@ -45,7 +45,7 @@ const main = async () => { const options = getCommandLineOptions(); const locale = options.locale || null; const url = options.url || null; - const octokit = github.getOctokit(process.env.OPENSOURCE_BOT_TOKEN); + const octokit = github.getOctokit(process.env.GITHUB_TOKEN); const repo = github.context.repo; if (locale) {