Skip to content

Commit ac4de75

Browse files
authoredFeb 3, 2022
Add workflow for automatically rebasing open PRs (#2612)
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 <[email protected]>
1 parent de2a4b4 commit ac4de75

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎.github/workflows/rebase.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: rebase pull request
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
rebase:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: peter-evans/rebase@v1
11+
with:
12+
base: master
13+
- name: Send failure message
14+
uses: peter-evans/create-or-update-comment@v1
15+
if: ${{ failure() }}
16+
with:
17+
issue-number: ${{ github.event.issue.number || github.event.number }}
18+
body: |
19+
Automatic rebasing for this PR has failed. You'll need to manually
20+
rebase against the default branch.

0 commit comments

Comments
 (0)
Please sign in to comment.