Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Optional rebase + merge --no-ff #46

Closed
gaizka opened this issue May 7, 2019 · 4 comments
Closed

Optional rebase + merge --no-ff #46

gaizka opened this issue May 7, 2019 · 4 comments

Comments

@gaizka
Copy link
Contributor

gaizka commented May 7, 2019

Hi!

First of all, thanks a lot for autorebase, it is a really useful project.

Would it be possible to configure autorebase to change its final rebase behaviour?

Now, when a PR has the "autorebase" tag, and the build status is green, autorebase merges the PR with the github api by using the rebase method.

I would like autorebase to do something like: git rebase + git merge --no-ff, to get something like this git history:

1-nonlinear-vs-linear

I have tried changing autorebase.ts to:

  await octokit.pulls.merge({
    merge_method: "merge",

and it does work, to some extend. autorebase merges the PR when the build is green, but it does not make a rebase first. It does not "detect" that the master branch has evolved and that before merging it should make another rebase.

Would it be possible to make something like this? I am not fluent at all at typescript, but if you give me some hints about what would be needed I can try to develop it.

Thanks a lot!!

@tibdex tibdex self-assigned this May 7, 2019
@tibdex
Copy link
Owner

tibdex commented Jun 10, 2019

Hi,

What would be the benefit of using merge_method: 'merge'? What do you don't like about rebase method? Have you read this section of the readme?

@robwise
Copy link

robwise commented Jun 21, 2019

The advantage is being able to see branch history/PRs explicitly in your Git history. If you're doing rebase merges, you can't tell where one branch or spike ended and the next one started when looking at the git history. You can only reverse engineer this by looking up some of the commits on GitHub and finding the associated PR, which is a bit clunky.

This is an example (sorry for redactions, don't want to breach my company's security policy). You can clearly see in the Git history where the original branch was and what PR it was without even needing to go to GitHub at all. We still rebase before merging though (enforced automatically by GitHub), so it's always in this extremely simple linear history the OP was talking about:

@tibdex tibdex removed their assignment Oct 16, 2019
@asbjornu
Copy link

I also vehemently detest squashes and want full Git history in feature branches when they are merged. All I want is a bot to perform a git rebase develop so feature branches are up to date and tested before merging. Since it's only possible to do a merge-update on a PR branch in GitHub's UI (see isaacs/github#88), you'd think autorebase would be the perfect solution to this problem.

@tibdex
Copy link
Owner

tibdex commented Sep 5, 2020

Thanks for reporting this but I don't maintain this project anymore.

@tibdex tibdex closed this as completed Sep 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants