Skip to content

chore: add Husky pre-commit hooks and auto-merge workflow #1

chore: add Husky pre-commit hooks and auto-merge workflow

chore: add Husky pre-commit hooks and auto-merge workflow #1

Workflow file for this run

name: Auto-merge
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: write
pull-requests: write
jobs:
automerge-owner:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'tomymaritano'
steps:
- name: Enable auto-merge for owner PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: gh pr merge "$PR_NUMBER" --auto --merge --repo "$GITHUB_REPOSITORY"
automerge-dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Enable auto-merge for dependabot PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: gh pr merge "$PR_NUMBER" --auto --merge --repo "$GITHUB_REPOSITORY"