From f427c1a4fc004628f5501586824d9e2c89f120f6 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 13 Sep 2024 12:13:12 +0200 Subject: [PATCH] devops: fix stable docs roll workflow --- .../azure-static-web-apps-delightful-forest-0a29f6210.yml | 2 +- .github/workflows/roll-next.yml | 2 +- .github/workflows/roll-stable.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-static-web-apps-delightful-forest-0a29f6210.yml b/.github/workflows/azure-static-web-apps-delightful-forest-0a29f6210.yml index bcb67f3283..c57b9c1d0f 100644 --- a/.github/workflows/azure-static-web-apps-delightful-forest-0a29f6210.yml +++ b/.github/workflows/azure-static-web-apps-delightful-forest-0a29f6210.yml @@ -78,7 +78,7 @@ jobs: if: github.repository == 'microsoft/playwright.dev' && startsWith(github.head_ref, 'roll/') steps: - name: Merge pull request - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} script: | diff --git a/.github/workflows/roll-next.yml b/.github/workflows/roll-next.yml index 9f92f87b9e..3b5a3c2241 100644 --- a/.github/workflows/roll-next.yml +++ b/.github/workflows/roll-next.yml @@ -50,7 +50,7 @@ jobs: git commit -m "feat(roll): roll to ToT Playwright ($(date +"%d-%m-%y"))" git push origin $BRANCH_NAME --force - name: Create Pull Request - uses: actions/github-script@v6 + uses: actions/github-script@v7 if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }} diff --git a/.github/workflows/roll-stable.yml b/.github/workflows/roll-stable.yml index 7a4f8ef485..e279fbe603 100644 --- a/.github/workflows/roll-stable.yml +++ b/.github/workflows/roll-stable.yml @@ -16,11 +16,11 @@ jobs: id: determine-version with: script: | - const allBranches = await github.rest.repos.listBranches({ + const allBranches = octokit.paginate("GET /repos/{owner}/{repo}/branches", { owner: 'microsoft', repo: 'playwright', }); - const relevantBranches = allBranches.data.filter(branch => branch.name.startsWith('release-')); + const relevantBranches = allBranches.filter(branch => branch.name.startsWith('release-')); relevantBranches.sort((a, b) => { const aVersion = parseFloat(a.name.split('-')[1]); const bVersion = parseFloat(b.name.split('-')[1]); @@ -72,7 +72,7 @@ jobs: git commit -m "feat(roll): roll to ${{ steps.determine-version.outputs.result }} Playwright" git push origin $BRANCH_NAME --force - name: Create Pull Request - uses: actions/github-script@v6 + uses: actions/github-script@v7 if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }} with: github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}