name: Auto-Merge
on:
  pull_request_target:

jobs:
  enable-auto-merge:
    runs-on: ubuntu-latest

    # Specifically check that dependabot (or another trusted party) created this pull-request, and that it has been labelled correctly.
    if: github.event.pull_request.user.login == 'blshkv' || github.event.pull_request.user.login == 'ZeroChaos-'
    steps:
    - uses: alexwilson/enable-github-automerge-action@main
      with:
        github-token: "${{ secrets.GITHUB_TOKEN }}"
