Skip to content

feat: detect changes in sources #185

feat: detect changes in sources

feat: detect changes in sources #185

Workflow file for this run

---
# Auto-merging
name: 'auto-merge'
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
permissions: read-all
jobs:
# Enable auto-merge on all pull requests by default
# Docs: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
enable-auto-merge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
continue-on-error: true
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable pull request auto-merge
run: |
gh pr merge --auto "${{ github.event.pull_request.number }}"
env:
GH_TOKEN: ${{ secrets.GH_PAT_AUTOMERGE }}
# If PR is made by dependabot, automatically approve the PR
# Linting and all checks will still have to pass in order for the PR to be merged
# Docs: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
auto-approve-dependabot:
runs-on: ubuntu-latest
permissions:
pull-requests: write
continue-on-error: true
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Auto approve dependabot pull requests
if: ${{ github.actor == 'dependabot[bot]' }}
run: |
gh pr review "${{ github.event.pull_request.number }}" --approve
env:
GH_TOKEN: ${{ secrets.GH_PAT_AUTOMERGE }}