From 34f336a0d449cbe4284bec54b8f72c0632008855 Mon Sep 17 00:00:00 2001 From: cpanato Date: Fri, 29 Sep 2023 08:18:41 -0400 Subject: [PATCH] only enable auto-merge not approval Signed-off-by: cpanato --- .github/workflows/auto-merge-deps.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/auto-merge-deps.yml b/.github/workflows/auto-merge-deps.yml index 82e2b276..b49c10af 100644 --- a/.github/workflows/auto-merge-deps.yml +++ b/.github/workflows/auto-merge-deps.yml @@ -24,18 +24,6 @@ jobs: - if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 - - name: Approve a PR if not already approved - if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} - run: | - gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status` - if [ "$(gh pr status --json reviews -q '[.currentBranch.reviews[]| select(type=="object" and has("state"))| .state | select(match("APPROVED"))] | unique | .[0]')" != "APPROVED" ]; - then gh pr review --approve "$PR_URL" - else echo "PR already approved, skipping additional approvals to minimize emails/notification noise."; - fi - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Enable auto-merge for Dependabot PRs if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }} run: gh pr merge --auto --squash "$PR_URL"