Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Only auto-update with no auto-merge #33

Open
salowenh opened this issue Mar 24, 2020 · 11 comments
Open

Only auto-update with no auto-merge #33

salowenh opened this issue Mar 24, 2020 · 11 comments

Comments

@salowenh
Copy link

Is it possible to configure the action to only auto-update the branch but not auto-merge?
If it be controlled by different labels it'll be amazing (autosquash / automerge)

@tibdex
Copy link
Owner

tibdex commented Apr 11, 2020

This GitHub Action is best used when you have a CI and a code review process in place. When that's the case, you don't usually want to trigger too many unnecessary builds because it would be costly and wasteful. This is what would happen with a behavior of doing "auto update" but not "auto merge". I think it's a good practice to only label a PR with autosquash when it's been approved by reviewers and its author consider it ready to be merged.

@salowenh
Copy link
Author

Thank you,
Our case is a bit different, but even with the scenario you've described where the label is added after a PR was approved, we still want a person to make the last "merge" click from various reasons, do you think it's that exceptional?

@zbynekwinkler
Copy link

Our workflow allows the reviewer to make comments/suggestions that are not hard requirements for merging (gives approval + comments, new commits don't invalidate the approval). The author can decide if the PR will be merged as-is or if the comments will be addressed. In this workflow, the automerge behavior is not wanted.

Do you know how to support this workflow? Do you know perhaps of a different action that provides only the "update" part?

@srolel
Copy link

srolel commented May 14, 2020

Also interested in this use-case.

@ejsmith
Copy link

ejsmith commented Jun 3, 2020

Yeah, I am looking for something that keeps branches up to date with their base automatically.

If this action is expected to only be used after a PR has been approved, then what are you doing to keep your PRs up to date with the base? Also, isn't it a bad idea to approve a PR that isn't up to date with the base? If so, then I guess the expectation is that the branch is manually merged before the review process starts?

@simonoff
Copy link

@salowenh @srolel @ejsmith we have working on that feature right now. I think next week we be able to publish some first version into public. Today started to test it locally.

@blackliner
Copy link

blackliner commented Sep 26, 2020

Hi, any updates here? I would also like to only use the autoupdate if base branch changes.

@tibdex I have to disagree on ...you don't usually want to trigger too many unnecessary builds because it would be costly and wasteful. CI resources are plenty, but developer time is sparse. So if developers have to manually click on update buttons, just to wait for however CI takes, I'd rather have CI work for them ASAP. Of course you should be able to only do automated rebases on certain conditions (PR activity, age etc)

@tibdex
Copy link
Owner

tibdex commented Nov 1, 2020

we still want a person to make the last "merge" click from various reasons

What are these reasons?

Our workflow allows the reviewer to make comments/suggestions that are not hard requirements for merging (gives approval + comments, new commits don't invalidate the approval). The author can decide if the PR will be merged as-is or if the comments will be addressed.

That's similar to #28 (comment). Why don't you let the authors add the autosquash label when they're done with this suggestions?

If this action is expected to only be used after a PR has been approved, then what are you doing to keep your PRs up to date with the base?

Nothing. What's the point of keeping un-reviewed/approved PRs up to date with their base just for the sake of it? It's just needlessly burning CI credits no?

Also, isn't it a bad idea to approve a PR that isn't up to date with the base? If so, then I guess the expectation is that the branch is manually merged before the review process starts?

It's not necessarily a bad idea since the PR changes can be orthogonal to the commits that landed on base since then. The test suite will still run before the final merge so semantic conflicts can still be caught.

Also, this can be unavoidable if the repo has a lot of activity.

@ejsmith
Copy link

ejsmith commented Nov 1, 2020

I think you could have rules about what an active vs stale branch is. Don't auto update a branch that hasn't had non-automated merge updates for X days. Also, we could use the draft PR feature to keep from getting automated merges before the branch is ready to be considered for merging.

@blackliner
Copy link

We are trying to find a solution to auto-update (preferably rebase) "active" PR's only. Active could be something like "activity within last 24h", where activity = {comments, commits, ...}.
Also we will use a WIP plugin that blocks automerge until that label is removed.

@brianespinosa
Copy link

This is basically what everyone here is asking for: https://github.com/tibdex/auto-update

Thanks @tibdex

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

8 participants