googleapis / github-repo-automation

A set of tools to automate multiple GitHub repository management.
Apache License 2.0
177 stars 37 forks source link

Ability to disable bulk approval, possibly all bulk actions for a particular repository #550

Open lesv opened 2 years ago

lesv commented 2 years ago

@kolea2, @Neenu1995 and I were having a chat regarding some bulk PR's and realized that the Bigtable team would like to manually review most PR's.

So, that means that we have to think when using the repo CLI tool, which is never a good thing. It would be nice if we could edit a configuration file in the repository and have the ability to disable some or all operations, particularly approve on the repo.

JustinBeckwith commented 2 years ago

Followed up a little over email - but wanted to share here that this is technically possible today :) Two approaches I can think of:

To prevent the PRs from ever going out, the person authoring the PR could use a query in repo.yaml that specifically blocks out as subset of repositories:

repoSearch:  'org:googleapis language:java NOT "googleapis/google-cloud-java"'

You could also play with things like repository topics to achieve the same effect:

repoSearch: "org:googleapis language:java -topic:artisanal"

Another approach here would be to modify your CODEOWNERS to remove yoshi-java. This would have the side effect of making you and your team entirely responsible for all reviews, which may honestly be the best route here. I would advocate for this over the first approach, since that sounds like what you're really after.

I want to discuss this internally to learn more about your specific scenarios, just to make sure what we're doing is working broadly for all languages.

bcoe commented 2 years ago

@Neenu1995 do you know if this is still a need that the Java team has, I know you've been moving towards using a sheet for managing bulk operations.

Neenu1995 commented 2 years ago

The sheet makes this possible and the repo tool is rarely used anymore by the java team. I would say it is not a requirement right now.