Skip to content

Add workflow for automatically rebasing open PRs #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +10 to +12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to give this workflow a custom PAT token to ensure that automatic rebasing works as intended. We've seen in the o-f/combo repository PRs that are way behind the latest HEAD of master fail to be rebased when commits that change the workflow definitions as doing so requires the workflow PAT token scope to be present.

- 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.