From f220dca673af37c74b348777ffb20515b8de58ec Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 22 Apr 2025 08:13:03 -0400 Subject: [PATCH 1/3] fix(ci): use Github Bot for Crowdin Signed-off-by: Aviv Keller --- .github/workflows/translations-sync.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/translations-sync.yml b/.github/workflows/translations-sync.yml index f2c43b6da1351..11fde8bda5d05 100644 --- a/.github/workflows/translations-sync.yml +++ b/.github/workflows/translations-sync.yml @@ -16,9 +16,7 @@ concurrency: cancel-in-progress: true permissions: - # These permissions required by `crowdin/github-action` - contents: write - pull-requests: write + contents: read jobs: synchronize-with-crowdin: @@ -51,7 +49,7 @@ jobs: pull_request_body: 'New Crowdin translations from the [Node.js Crowdin project](https://crowdin.com/project/nodejs-web)' commit_message: 'chore: synced translations from crowdin' env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} # A numeric ID, found at https://crowdin.com/project/nodejs-web/tools/api CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} # Created from https://crowdin.com/settings#api-key logged in using nodejs-crowdin-bot @@ -76,6 +74,7 @@ jobs: with: # Use the number from the output of crowdin/github-action ref: refs/pull/${{ needs.synchronize-with-crowdin.outputs.pull_request_number }}/head + token: ${{ secrets.GH_USER_TOKEN }} - name: Restore Lint Cache uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 From dcf3dab5500b30d53c3f10c062960e22a23dbaa7 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 22 Apr 2025 10:52:15 -0400 Subject: [PATCH 2/3] `CROWDIN_GITHUB_BOT_TOKEN` Signed-off-by: Aviv Keller --- .github/workflows/translations-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/translations-sync.yml b/.github/workflows/translations-sync.yml index 11fde8bda5d05..cc428ba5a8ba9 100644 --- a/.github/workflows/translations-sync.yml +++ b/.github/workflows/translations-sync.yml @@ -49,7 +49,7 @@ jobs: pull_request_body: 'New Crowdin translations from the [Node.js Crowdin project](https://crowdin.com/project/nodejs-web)' commit_message: 'chore: synced translations from crowdin' env: - GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CROWDIN_GITHUB_BOT_TOKEN }} # A numeric ID, found at https://crowdin.com/project/nodejs-web/tools/api CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} # Created from https://crowdin.com/settings#api-key logged in using nodejs-crowdin-bot @@ -74,7 +74,7 @@ jobs: with: # Use the number from the output of crowdin/github-action ref: refs/pull/${{ needs.synchronize-with-crowdin.outputs.pull_request_number }}/head - token: ${{ secrets.GH_USER_TOKEN }} + token: ${{ secrets.CROWDIN_GITHUB_BOT_TOKEN }} - name: Restore Lint Cache uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 From 644c28aad5e9bfcf3f558d6e37eae208e4425026 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 22 Apr 2025 10:55:30 -0400 Subject: [PATCH 3/3] checkout w/ token Signed-off-by: Aviv Keller --- .github/workflows/translations-sync.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/translations-sync.yml b/.github/workflows/translations-sync.yml index cc428ba5a8ba9..e703fb8e41ffe 100644 --- a/.github/workflows/translations-sync.yml +++ b/.github/workflows/translations-sync.yml @@ -32,6 +32,8 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + token: ${{ secrets.CROWDIN_GITHUB_BOT_TOKEN }} # see all the options at https://github.com/crowdin/github-action - name: Crowdin PR