rebase icon indicating copy to clipboard operation
rebase copied to clipboard

Automatic rebase on pushes to base branch

Open fkorotkov opened this issue 6 years ago • 8 comments

It will be nice to have an option to trigger the action on push events to a branch to rebase all PRs that want to merge into this branch.

fkorotkov avatar Jan 22 '19 16:01 fkorotkov

All pushes would be nice, but I’d personally want to restrict it to the “update branch” button, both so it doesn’t autorebase every time i push on the cli (even if it’s already rebased), and so it’s an explicit action separate from pushes.

ljharb avatar Jan 22 '19 17:01 ljharb

Maybe can be configurable to what branches should do the rebase? Or instead rebase, maybe merge from master...

piranna avatar Feb 15 '19 10:02 piranna

Certainly I'd expect any and every github action to be configurable just like branch protections - to target all branches, specific branches, or just branches matching a pattern.

ljharb avatar Feb 15 '19 17:02 ljharb

Certainly I'd expect any and every github action to be configurable just like branch protections - to target all branches, specific branches, or just branches matching a pattern.

maybe https://github.com/actions/bin/tree/master/filter would do the trick

piranna avatar Feb 15 '19 21:02 piranna

Hey, any update on this issue ?

Would love to contribute if someone can give me some help to do this. :+1:

mrpandat avatar Nov 12 '19 17:11 mrpandat

@mrpandat no progress on this issue so far.

I've only though about a possible solution. IMO such feature is not that generic because for repositories with high amount of commits it can overwhelm CI. And as @ljharb most likely you want to explicitly trigger such batch rebase only for PRs that do some breaking changes to APIs or just massive refactorings.

I think the easiest solution will be to create a separate action (or separate script within this action) that upon a comment like /rebase-open-prs to an already merged PR will comment with /rebase because of #<PR NUMBER> in all PRs targeting the same branch.

fkorotkov avatar Nov 12 '19 18:11 fkorotkov

entrypoint.sh

omar1326 avatar Apr 14 '20 08:04 omar1326

The danger of an autonomous rebase is that the rebase involves a force-push. So unless great care if taking there is a potentially that some commits by PR author will be overridden.

gsuess avatar Oct 05 '20 15:10 gsuess