This GitHub action will scan all open pull requests in the current project and merge them.
The pull request needs to be mergeable (no conflicts), got a green build and contains a label (default: automerge
).
If the pull request contains an ignore label (default: wip
), the pull request will be skipped.
After a succesul merge, the label is removed.
The action is designed to run asynchronously (e.g. every hour, once a day), so it can take a few minutes after the pull request got merged.
You can create a new workflow that runs every day at 10 AM.
You should not use a very short interval otherwise you will reach the GitHub API limit.
# .github/workflows/automatic-merge.yml
name: "Automatic Merge"
on:
schedule:
- cron: '0 * * * *'
jobs:
merge:
name: "Merge Pull Requests"
runs-on: ubuntu-latest
steps:
- name: "Merge"
uses: "nucleos/auto-merge-action@1.0.0"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}