Skip to content

ci: Remove auto-approve PR steps #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/dependabot-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,6 @@ defaults:
shell: bash

jobs:
auto-approve:
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
runs-on: ubuntu-22.04
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
- 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:
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]'}}
runs-on: ubuntu-22.04
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/devbox-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:

- name: Create PR using app token
if: steps.devbox-versions-changed.outputs.number_changed > 0
id: create-pr
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
Expand All @@ -82,15 +81,3 @@ jobs:
--body "This PR was automatically created by the scheduled devbox update workflow." \
--label ignore-for-release)"
gh pr merge --auto --squash "${pr_url}"
echo "pr_url=${pr_url}" >>"${GITHUB_OUTPUT}"

- name: Approve PR using workflow token
if: steps.devbox-versions-changed.outputs.number_changed > 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then
gh pr review --approve "${{ steps.create-pr.outputs.pr_url }}"
else
echo "PR already approved, skipping additional approvals to minimize emails/notification noise."
fi