name: merge pull-request

permissions:
  pull-requests: write

on:
    pull_request:
        types:
            - labeled
jobs:
    merge:
        environment:
            name: sudo-bot-workflows
        runs-on: ubuntu-latest
        steps:
            - name: merge pull request
              uses: sudo-bot/action-pull-request-merge@v1.2.0
              with:
                  github-token: ${{ secrets.WDES_BOT_TOKEN }}
                  number: ${{ github.event.pull_request.number }}
                  allowed-usernames-regex: ^williamdes$
                  filter-label: merge-it
                  merge-method: fast-forward
