[llvm] [GitHub] Add workflow to check author's commit access on new PRs (PR #123593)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 01:13:04 PST 2025


DavidSpickett wrote:

> Haven't looked in depth at the code yet, but would it make more sense to split this into a separate workflow that triggers on pull_request_review?
> 
> I think labelling/writing a comment pinging the reviewer who approved the PR (maybe after checking the reviewer is a member of the LLVM org) that the author needs someone else to merge their PR could help streamline this even more.

I also think this, but the reality of GitHub disagrees with this. The event that would cause that workflow can only read from the repository, see https://github.com/orgs/community/discussions/26651 and https://github.com/orgs/community/discussions/55940. This is why my original attempt was reverted.

However, I agree that a notification to the author as close as possible to the approval is best.

As [suggested](https://discourse.llvm.org/t/rfc-encouraging-reviewers-to-merge-on-behalf-of-pr-authors-without-commit-access/84180/5) on the RFC, we may be able to work around this with a label on open, then a timed sweep of PRs where we comment on any labelled and approved PR, then remove the label.

This workflow can check things like whether the author has set an email address, whether one of the approvers has permissions, anything we need to make either party aware of.

I'm not going to be surprised if GitHub has somehow made this impossible too - but I have hope that it can work :).

In other words: thanks to folks who reviewed this PR, but it will likely become one component of a pair of workflows instead.

https://github.com/llvm/llvm-project/pull/123593


More information about the llvm-commits mailing list