llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.52k stars 11.79k forks source link

Define a policy for acceptance before merge #56673

Open rengolin opened 2 years ago

rengolin commented 2 years ago

We currently need approvals to merge, either official flags in Phab or the text "LGTM" on some comment. GH allows us to go one step further and define what kind of approval we get before allowing someone to press the "merge" button.

We also have a less defined policy to when multiple approvals are necessary, or how long to wait for new comments before merging after the first approval.

Given that our developers all have GH accounts and clicking on "accept" is easier than writing "LGTM", I think it's trivial to define that someone must approve the commit before merging (automation-wise), but there are questions as to who or how many need to approve before merge.

Things to consider:

llvmbot commented 2 years ago

@llvm/issue-subscribers-infrastructure

hubert-reinterpretcast commented 2 years ago

How does this interact direct pushes to main and reverts/reapplies?

rengolin commented 2 years ago

How does this interact direct pushes to main and reverts/reapplies?

It doesn't. This is just an extension of the policy for reviews.

I don't want this to change the current policy on direct access (how, why, etc).

tstellar commented 1 year ago

Do we need a new policy for pull requests? Can we just use the same policies we have for Phabricator?

crtrott commented 1 year ago

I think the mechanical way to do this in github is to have a code owner file, and require code owner approval, and also only allow code owners to click merge. This may however be connected to the access rights on the main branch. I.e. to prohibit folks from merging, you also need to prohibit them from directly pushing?