ci: update template so GAPIC_AUTO repos do not require special approvers for Java code#1494
Conversation
| {% if 'codeowner_team' in metadata['repo'] %} | ||
| # The {{ metadata['repo']['codeowner_team'] }} is the default owner for changes in this repo | ||
| * @googleapis/yoshi-java {{ metadata['repo']['codeowner_team'] }} | ||
| {% if 'library_type' in metadata['repo'] and metadata['repo']['library_type'] != 'GAPIC_AUTO' %} |
There was a problem hiding this comment.
suggest adding a comment of something like
# for handwritten libraries keep {{ metadata['repo']['codeowner_team'] }} as owner
There was a problem hiding this comment.
Done in the next line.
|
Further clarification from @iennae : This PR allows handwritten libraries to keep the review requirements. We didn't access whether handwritten libraries needed sole access over the **/*.java files. It might be the case that it's sufficient to just remove the line in the template |
| - team: java-samples-reviewers | ||
| permission: push |
There was a problem hiding this comment.
FYI: @kolea2 @averikitsch This should give "Write" role to the team.
There was a problem hiding this comment.
Unfortunately OwlBot (postpostprocessor) didn't modify sync-repo-settings.yaml in https://github.com/googleapis/java-containeranalysis/pull/912/files

As discussed with @iennae, with this change the gapic auto repositories will not to have approval entry for Java files in CODEOWNERS. These Java files are auto-generated and thus no point in a special human teams reviewing them.
Also giving java-samples-reviewers Write role so that the last line of CODEOWNERS file is effective
samples/**/*.java @googleapis/java-samples-reviewers.