From 0b3a472fd2bd3dad959cd0fc0ae1fe6cfebc2d1a Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 8 May 2024 18:21:49 +0100 Subject: [PATCH] devops: remove some use of REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN --- .github/workflows/cherry_pick_into_release_branch.yml | 2 +- .github/workflows/pr_check_client_side_changes.yml | 2 +- .github/workflows/roll_browser_into_playwright.yml | 2 +- .github/workflows/roll_driver_nodejs.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cherry_pick_into_release_branch.yml b/.github/workflows/cherry_pick_into_release_branch.yml index f48028b14b..f8f89786fe 100644 --- a/.github/workflows/cherry_pick_into_release_branch.yml +++ b/.github/workflows/cherry_pick_into_release_branch.yml @@ -14,6 +14,7 @@ on: permissions: contents: write + pull-requests: write jobs: roll: @@ -62,7 +63,6 @@ jobs: - name: Create Pull Request uses: actions/github-script@v6 with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} script: | const readableCommitHashesList = '${{ github.event.inputs.commit_hashes }}'.split(',').map(hash => `- ${hash}`).join('\n'); const response = await github.rest.pulls.create({ diff --git a/.github/workflows/pr_check_client_side_changes.yml b/.github/workflows/pr_check_client_side_changes.yml index c048bc3ca0..71099b9d06 100644 --- a/.github/workflows/pr_check_client_side_changes.yml +++ b/.github/workflows/pr_check_client_side_changes.yml @@ -48,7 +48,7 @@ jobs: issueBody = issueCreateData.body; } const newBody = issueBody.trimEnd() + ` - - [ ] https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha} (${commitHeader})`; + - [ ] https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha} (${commitHeader})`; const data = await github.rest.issues.update({ owner: context.repo.owner, repo: repo, diff --git a/.github/workflows/roll_browser_into_playwright.yml b/.github/workflows/roll_browser_into_playwright.yml index 69dba0804d..3a7aa41952 100644 --- a/.github/workflows/roll_browser_into_playwright.yml +++ b/.github/workflows/roll_browser_into_playwright.yml @@ -9,6 +9,7 @@ env: permissions: contents: write + pull-requests: write jobs: roll: @@ -40,7 +41,6 @@ jobs: - name: Create Pull Request uses: actions/github-script@v6 with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} script: | const response = await github.rest.pulls.create({ owner: 'microsoft', diff --git a/.github/workflows/roll_driver_nodejs.yml b/.github/workflows/roll_driver_nodejs.yml index 2019303d58..2935dee741 100644 --- a/.github/workflows/roll_driver_nodejs.yml +++ b/.github/workflows/roll_driver_nodejs.yml @@ -11,6 +11,7 @@ jobs: if: github.repository == 'microsoft/playwright' permissions: contents: write + pull-requests: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -37,7 +38,6 @@ jobs: if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} uses: actions/github-script@v6 with: - github-token: ${{ secrets.REPOSITORY_DISPATCH_PERSONAL_ACCESS_TOKEN }} script: | await github.rest.pulls.create({ owner: 'microsoft',