From e761b7d7111e4826467727f354ae8c18893ab38a Mon Sep 17 00:00:00 2001 From: Samson <16504129+sagudev@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:44:47 +0200 Subject: [PATCH] Auto merge all WPT and dependabot PRs (#32775) * Auto merge all WPT and dependabot PRs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Adjust name of action Signed-off-by: Martin Robinson --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Martin Robinson Co-authored-by: Martin Robinson --- .github/workflows/auto-merge-updates.yml | 18 ++++++++++++++++++ .github/workflows/dependabot-pr.yml | 22 ---------------------- 2 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/auto-merge-updates.yml delete mode 100644 .github/workflows/dependabot-pr.yml diff --git a/.github/workflows/auto-merge-updates.yml b/.github/workflows/auto-merge-updates.yml new file mode 100644 index 00000000000..a1ebbd75cc1 --- /dev/null +++ b/.github/workflows/auto-merge-updates.yml @@ -0,0 +1,18 @@ +name: Automerge Dependabot & WPT Updates +on: pull_request + +permissions: + pull-requests: read + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'servo-wpt-sync' }} + steps: + - name: Approve the PR & enable auto-merge + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.SERVO_DEPENDABOT_TOKEN }} diff --git a/.github/workflows/dependabot-pr.yml b/.github/workflows/dependabot-pr.yml deleted file mode 100644 index cd7bf272c1c..00000000000 --- a/.github/workflows/dependabot-pr.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Approve & merge successful dependabot patch upgrade PRs -on: pull_request - -permissions: - pull-requests: read - -jobs: - dependabot: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v1 - - name: Approve the PR & enable auto-merge - if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} - run: | - gh pr review --approve "$PR_URL" - gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.SERVO_DEPENDABOT_TOKEN}}