A GitHub Action to automatically notify all PRs to rebase when their base branch receives a new push
- You must have set up the Rebase GitHub Action
Create a workflow file under .github/workflows
called autorebase.yml
with
the following content:
name: Auto-Rebase Notify
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger rebase
uses: snasirca/autorebase-notify-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOTE: To ensure GitHub Actions is automatically re-run after a successful rebase action use a Personal Access Token for
snasirca/autorebase-notify-action@main
. See the following discussion for more details.
...
- name: Trigger rebase
uses: snasirca/autorebase-notify-action@main
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
Add the label autorebase
to PRs that you want to target.