Skip to content

Commit

Permalink
ci: Remove auto-approve PRs now it is disabled at org level (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson authored Mar 26, 2024
1 parent 0bd62fe commit 1317b83
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/dependabot-automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'}}
Expand Down

0 comments on commit 1317b83

Please sign in to comment.