Remove gemini-code-assit[bot] from required reviewers#106
Remove gemini-code-assit[bot] from required reviewers#106melodylu wants to merge 1 commit intoabcxyz:mainfrom
Conversation
Gemini won't approve PRs, but it sure does leave a lot of comments. Signed-off-by: Mel Lu <melodylu@users.noreply.github.com>
| submittedReviews | ||
| .filter((r) => r.user.login !== context.payload.pull_request.user.login) | ||
| // Gemini code assist cannot approve PRs, but it will leave comments | ||
| .filter((r) => r.user.login !== "gemini-code-assist[bot]") |
There was a problem hiding this comment.
A more general approach would be to pass in a list of user logins you would like excluded as an input to the action. Then you could exclude gemini code assist or whatever other user login you desire. Are you opposed to doing that instead?
There was a problem hiding this comment.
Sure, though I reached for simple here assuming many other people may end up in this gemini situation, gemini-code-assist is the only LLM bot Googlers using these actions can apply.
Proposing "want_lgtm=all, except this list" sounded like a harder sell and isn't part of the original (go/cr-request-review#using-want-lgtm). But want me to draft that up?
There was a problem hiding this comment.
let me consult with my colleagues and get back to you.
There was a problem hiding this comment.
Hi @melodylu we think adding this approach makes the most sense for now.
- Add a boolean flag as an input to ignore bots. The default for this flag would be the current behavior (so false)
- If the flag is set to true then any bot user is excluded from the list of approvers.
Does this sound like something you are willing to draft up?
There was a problem hiding this comment.
I'm not sure how to assume "bot users", will they always have [bot] in their username?
I'm happy to draft something when I get back on 11/3, if you have a plan for what a bot user would be? I would be so, so very wary of filtering arbitrarily for the word "bot" in anyone's username, like 18% of my friends/coworkers gave themselves github names that have the word "bot" in it because I used to work in robotics.
The best way I can think of is that
gemini-code-assist[botis in a list of known bots that exists in this action- the boolean flag controls "exclude the known list of bots, or don't"
There was a problem hiding this comment.
Normal usernames are restricted to alphanumeric characters and hyphens. So a human user will never have the characters [ or ] in their name. Furthermore official bot accounts always end with the [bot] suffix. So it should be safe to exclude any username that ends with [bot]
|
I removed myself as reviewer, please feel free to add me back once Brian (lock14) approves. |

This filters
gemini-code-assist[bot]out of the required reviewers who need to Approve the PR, since Gemini is not able to approve PRs.We use both gemini-code-assist AND the
want_lgtm=alltag in our repositories, and with gemini auto-reviewing things, it means that PR authors cannot use thewant_lgtm=alltag without getting stuck in a state where they can never get approval from Gemini.