Skip to content

Commit

Permalink
Add workflow for automatically rebasing open PRs (#2612)
Browse files Browse the repository at this point in the history
Introduce a workflow that's reponsible for automatically rebasing open
PRs when a commit has landed in the default (e.g. master) branch. Ensure
a comment is posted on that PR when the rebasing action job has failed.

Signed-off-by: timflannagan <timflannagan@gmail.com>
  • Loading branch information
timflannagan committed Feb 3, 2022
1 parent de2a4b4 commit ac4de75
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: rebase pull request
on:
push:
branches:
- master
jobs:
rebase:
runs-on: ubuntu-latest
steps:
- uses: peter-evans/rebase@v1
with:
base: master
- name: Send failure message
uses: peter-evans/create-or-update-comment@v1
if: ${{ failure() }}
with:
issue-number: ${{ github.event.issue.number || github.event.number }}
body: |
Automatic rebasing for this PR has failed. You'll need to manually
rebase against the default branch.

0 comments on commit ac4de75

Please sign in to comment.