This thread is to discuss issues related to, but not part of RFC: Commit Access Criteria.
The current state of things is that you do not need write permissions, push permissions or commit access (some of which aren’t quite the same thing but are for this discussion’s purposes) to contribute code to LLVM.
If you do not have the ability to merge your own Pull Request, someone with that ability can merge it on your behalf.
See the very end of Contributing to LLVM — LLVM 20.0.0git documentation, which itself should be made more obvious IMO.
So one aspect of this is how do authors know that they can ask for a merge on behalf?
We can break out that statement in the contribution guide and make it harder to miss.
The other problem is, how do reviewers know whether the author needs the PR to be merged on their behalf?
We have a stand off here, exacerbated by the fact that, at least in my experience, the LLVM way has not been to merge someone’s PR for them, in case they still had work they wanted to do on it. This worked fine when we all had to have commit access to contribute, but now less so.
(also this was never documented, it’s just a habit I picked up, rapidly becoming a bad one)
I have noticed in other GitHub hosted projects that once reviewers have approved and CI passes, maintainers generally merge things without asking any more questions. So perhaps we would move toward that model more explicitly.
There is a risk there of landing PRs that blow up builds, while the author is away from their desk. If we stick to reverting to green, this is less of a problem. They return to a land and a revert, no great harm done. I would understand reviewers not merging on behalf when they are about to stop work though, as someone has to push that revert.
There is also the issue of pushing someone’s PR and the buildbot emails going to them not you, but anyone can revert a PR easily from the GitHub web interface, which mitigates that as long as everyone feels comfortable doing so.
I have tried to address the fact that reviewers don’t know they can, or should, merge on behalf in two ways:
- In a comment on the PR after a review is approved but the author doesn’t have commit access. This turned out not to work because the GitHub event that this approval creates, cannot write to the repository, see Revert "[GitHub][workflows] Ask reviewers to merge PRs when author cannot" by DavidSpickett · Pull Request #81722 · llvm/llvm-project · GitHub.
If anyone knows GitHub better than I and can prove me wrong on that, that would be wonderful. Or if anyone has contacts there who can tell us whether we’re barking up the wrong tree entirely.
See Elevante GITHUB_TOKEN permissions in pull_request_review workflow · community · Discussion #26651 · GitHub and `pull_request_review` event doesn't allow setting token permissions · community · Discussion #55940 · GitHub.
- Adding a label to all new PRs from authors without commit access - [GitHub] Add workflow to check author's commit access on new PRs by DavidSpickett · Pull Request #123593 · llvm/llvm-project · GitHub. I’m 99% sure this can work, because we already label and comment on new PRs.
This has the advantage of always being visible in the labels list, and you can do searches based on it.
It is however, not done at the time of approval, so someone will have to see the label later and know what it means.
So, do people think there are other issues to tackle here, do you have other ideas for how automation should work for this, if at all?
@tstellar you suggested a new thread for this, so feel free to reply with your own agenda.