Skip to content

fix(deps): bump rubocop from 1.86.2 to 1.87.0 in the bundler-non-major group #14

fix(deps): bump rubocop from 1.86.2 to 1.87.0 in the bundler-non-major group

fix(deps): bump rubocop from 1.86.2 to 1.87.0 in the bundler-non-major group #14

name: Dependabot Auto-Merge
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: write
pull-requests: write
jobs:
auto_merge:
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve and auto-merge non-major updates
# GITHUB_TOKEN approves (satisfying the 1-review requirement).
# RELEASE_TOKEN (admin-owned PAT) enables auto-merge so the
# squash-merge proceeds once required status checks pass.
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }}
run: |
echo "Dependabot update type: $UPDATE_TYPE"
if echo "$UPDATE_TYPE" | grep -Eq 'version-update:semver-(minor|patch)'; then
gh pr review --approve "$PR_URL"
GH_TOKEN="$MERGE_TOKEN" gh pr merge --auto --squash "$PR_URL"
echo "Approved and auto-merge enabled for non-major update."
else
echo "Skipping auto-merge: major or unknown update type."
fi