From cb8e6af08cac4420d37f4640f0f40e0e15b49317 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 2 Sep 2021 11:05:14 +0000 Subject: [PATCH 1/6] chore(python): add .github/CODEOWNERS as a templated file --- .../templates/python_library/.github/CODEOWNERS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 synthtool/gcp/templates/python_library/.github/CODEOWNERS diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS new file mode 100644 index 000000000..931d205df --- /dev/null +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -0,0 +1,17 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. +# +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +{% if 'codeowner_team' in metadata['repo'] %} +# @googleapis/yoshi-python and {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo +* @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} + +/samples/ @googleapis/python-samples-owners {{ metadata['repo']['codeowner_team'] }} +{% else %} +# @googleapis/yoshi-python is the default owner for changes in this repo +* @googleapis/yoshi-python + +/samples/ @googleapis/python-samples-owners +{% endif -%} From ebb449a983d3de5a7f1f187d91abf8cbe3ba8654 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 3 Sep 2021 10:05:46 +0000 Subject: [PATCH 2/6] limit to library_type GAPIC_AUTO --- synthtool/gcp/templates/python_library/.github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS index 931d205df..1e5d20d1c 100644 --- a/synthtool/gcp/templates/python_library/.github/CODEOWNERS +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -4,7 +4,7 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -{% if 'codeowner_team' in metadata['repo'] %} +{% if 'codeowner_team' in metadata['repo'] and metadata['repo']['library_type'] == "GAPIC_AUTO" %} # @googleapis/yoshi-python and {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo * @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} From e9bfccd37c6021b51fb7ef7369106306cb185a91 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 3 Sep 2021 10:27:04 +0000 Subject: [PATCH 3/6] add comment for samples owner --- synthtool/gcp/templates/python_library/.github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS index 1e5d20d1c..381db6a8c 100644 --- a/synthtool/gcp/templates/python_library/.github/CODEOWNERS +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -8,10 +8,12 @@ # @googleapis/yoshi-python and {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo * @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} +# @googleapis/python-samples-owners and {{ metadata['repo']['codeowner_team'] }} are the default owners for samples changes /samples/ @googleapis/python-samples-owners {{ metadata['repo']['codeowner_team'] }} {% else %} # @googleapis/yoshi-python is the default owner for changes in this repo * @googleapis/yoshi-python +# @googleapis/python-samples-owners is the default owner for samples changes /samples/ @googleapis/python-samples-owners {% endif -%} From 448dbb0df432e89289d7b72c126c982a83ae4926 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 3 Sep 2021 11:07:47 +0000 Subject: [PATCH 4/6] remove check for GAPIC_AUTO --- synthtool/gcp/templates/python_library/.github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS index 381db6a8c..7273da4d0 100644 --- a/synthtool/gcp/templates/python_library/.github/CODEOWNERS +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -4,7 +4,7 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -{% if 'codeowner_team' in metadata['repo'] and metadata['repo']['library_type'] == "GAPIC_AUTO" %} +{% if 'codeowner_team' in metadata['repo'] %} # @googleapis/yoshi-python and {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo * @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} From e11a7b065941a3aa2ab8760d7023096db19db634 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 11 Nov 2021 15:48:16 +0000 Subject: [PATCH 5/6] Update comment --- synthtool/gcp/templates/python_library/.github/CODEOWNERS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS index 7273da4d0..485ed2094 100644 --- a/synthtool/gcp/templates/python_library/.github/CODEOWNERS +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -3,12 +3,11 @@ # # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax - -{% if 'codeowner_team' in metadata['repo'] %} -# @googleapis/yoshi-python and {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo +{% if metadata['repo']['codeowner_team']|length %} +# @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo * @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} -# @googleapis/python-samples-owners and {{ metadata['repo']['codeowner_team'] }} are the default owners for samples changes +# @googleapis/python-samples-owners {{ metadata['repo']['codeowner_team'] }} are the default owners for samples changes /samples/ @googleapis/python-samples-owners {{ metadata['repo']['codeowner_team'] }} {% else %} # @googleapis/yoshi-python is the default owner for changes in this repo From 923cee2167041d2264310a83850c4b3f80b7b254 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 11 Nov 2021 16:14:25 +0000 Subject: [PATCH 6/6] add comment --- synthtool/gcp/templates/python_library/.github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/synthtool/gcp/templates/python_library/.github/CODEOWNERS b/synthtool/gcp/templates/python_library/.github/CODEOWNERS index 485ed2094..ae9c73369 100644 --- a/synthtool/gcp/templates/python_library/.github/CODEOWNERS +++ b/synthtool/gcp/templates/python_library/.github/CODEOWNERS @@ -3,6 +3,7 @@ # # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax +# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json. {% if metadata['repo']['codeowner_team']|length %} # @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }} are the default owners for changes in this repo * @googleapis/yoshi-python {{ metadata['repo']['codeowner_team'] }}