Enabling auto-merge

13 views
Skip to first unread message

Levi Harrison

unread,
Nov 25, 2021, 9:24:41 AM11/25/21
to Prometheus Developers
Hi all,

Picking up the previous thread (https://groups.google.com/g/prometheus-developers/c/tPLOmT9pnBw/m/kxLn0q59AgAJ), I'd like to re-propose allowing auto-merge as a merge option.

Auto-merge is a merge option, to be used in conjugation with other merge options like squash merge, that once "enabled" for a pull request (the same action as clicking the merge button), will automatically merge the pull request once all checks have passed and required approvals have been submitted. If more commits are added by contributors without write access in the period between when auto-merge is enabled and the PR is merged, auto-merge will be canceled.

Auto-merge won't just merge any PR once it's green, it requires the same intentional action from a maintainer as regularly merging a PR does. Auto-merge also doesn't equate an approval as a merge action, unless it is one of the requirements to merge and auto-merge is enabled. I believe we only require approvals on release branches, so only if a maintainer has decided to enable auto-merge for a PR to a release branch would an approval ever cause a PR to be auto-merged.


Personally, I could see this being useful when myself or a contributor has just pushed to PR and I want to merge it, but also can't sit around for 20 minutes until all the checks pass.

Thanks (and congratulations to all the new team members),
Levi

Augustin Husson

unread,
Nov 25, 2021, 9:33:01 AM11/25/21
to Levi Harrison, Prometheus Developers
Hi Levi,

From my point of view, yeah it's safe to activate it. But before doing that, maybe we should take a look at the different jobs and figure out which one are mandatory ? Probably all jobs are mandatory (that's my feeling at least).

Cheers,
Augustin.

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/b32fd1fc-2e43-4177-a17f-7b7207ff2d42n%40googlegroups.com.

Levi Harrison

unread,
Nov 25, 2021, 9:44:34 AM11/25/21
to Augustin Husson, Prometheus Developers
Hi Augustin,

That's one thing I was slightly confused about. In the official documentation (https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) it says "when all required reviews are met and status checks have passed", which makes me think that it doesn't take the "required status check" distinction into consideration, instead just waiting for all of them to pass, required or not. I agree with you that for auto-merge all jobs should be mandatory.

Thanks,
Levi

Augustin Husson

unread,
Nov 25, 2021, 9:51:00 AM11/25/21
to Levi Harrison, Prometheus Developers
Oh I was more meaning to check which job should be marked as "required". Like it is the case for the job "ci/circleci:build"

And in the end of the sentence you "status checks have passed". Which I'm pretty sure is matching the job marked as "required". So that's I was saying maybe before activating the auto-merge, we should decide which CI jobs are required.

Julien Pivotto

unread,
Nov 25, 2021, 12:16:34 PM11/25/21
to Levi Harrison, Augustin Husson, Prometheus Developers
Hello,

I have enabled "auto merge" in prometheus/prometheus with the following
checks:

build
test_mixins
test_windows
test_go
test_ui
Fuzzing
lint

It's an experiment, we can revert if we wish. Also, it's opt in per pull
request ofc.
> >> <https://groups.google.com/d/msgid/prometheus-developers/b32fd1fc-2e43-4177-a17f-7b7207ff2d42n%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CAJrMkW6uv8p_Mhffk2LwEuPZmNb0qBDQrVuQb1HxNqTc-mdG3A%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie

Matthias Rampke

unread,
Nov 26, 2021, 5:10:49 AM11/26/21
to Levi Harrison, Augustin Husson, Prometheus Developers
Ah, I didn't understand at first that this is a per-pull-request thing. What is the right way to enable this? Do I change the repository configuration by hand?

/MR

Augustin Husson

unread,
Nov 26, 2021, 5:19:32 AM11/26/21
to Matthias Rampke, Levi Harrison, Prometheus Developers
Yup, you need to go in the settings -> options. Then scroll to the "Merge Button" section, you have a the option "Allow auto-merge":

image.png
Reply all
Reply to author
Forward
0 new messages