Skip to content

fix(ci): add --repo flag to gh commands in auto-merge workflow #221

fix(ci): add --repo flag to gh commands in auto-merge workflow

fix(ci): add --repo flag to gh commands in auto-merge workflow #221

name: Auto merge Dependabot pull requests
on: # zizmor: ignore[dangerous-triggers]
pull_request_target:
types:
- labeled
- opened
- synchronize
- reopened
- ready_for_review
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
name: Auto merge Dependabot pull requests
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Approve
run: gh pr review "$PR_NUMBER" --approve --repo "$GITHUB_REPOSITORY"
env:
PR_NUMBER: ${{ github.event.number }}
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}
- name: Enable auto-merge
run: gh pr merge "$PR_NUMBER" --auto --squash --repo "$GITHUB_REPOSITORY"
env:
PR_NUMBER: ${{ github.event.number }}
GH_TOKEN: ${{ secrets.LOCALSTACK_BOT_TOKEN }}