From 1317b83e666b16f1f2b093d284baec61c70a8e6b Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Tue, 26 Mar 2024 11:41:03 +0000 Subject: [PATCH] ci: Remove auto-approve PRs now it is disabled at org level (#278) --- .github/workflows/dependabot-automation.yaml | 23 -------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/dependabot-automation.yaml b/.github/workflows/dependabot-automation.yaml index 53ee285..66653c4 100644 --- a/.github/workflows/dependabot-automation.yaml +++ b/.github/workflows/dependabot-automation.yaml @@ -13,29 +13,6 @@ permissions: contents: write jobs: - auto-approve: - runs-on: ubuntu-22.04 - if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} - defaults: - run: - shell: bash - steps: - - name: Dependabot metadata - id: dependabot-metadata - uses: dependabot/fetch-metadata@v2 - - uses: actions/checkout@v4 - - name: Approve a PR if not already approved - run: | - gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status` - if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "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}} - enable-automerge: runs-on: ubuntu-22.04 if: ${{ github.event.pull_request.user.login == 'dependabot[bot]'}}