From 113be9ec11f6b5e1257ff5383180e893f375d28c Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 6 Oct 2020 10:02:58 -0700 Subject: [PATCH] Added COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY support to github pullRequest commentControl (#4055) (#2552) Signed-off-by: Modular Magician --- .changelog/4055.txt | 3 +++ google-beta/resource_cloud_build_trigger.go | 4 ++-- website/docs/r/cloudbuild_trigger.html.markdown | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changelog/4055.txt diff --git a/.changelog/4055.txt b/.changelog/4055.txt new file mode 100644 index 0000000000..f1f731b6f3 --- /dev/null +++ b/.changelog/4055.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +cloudbuild: Added `COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY` support to `google_cloudbuild_trigger.github.pull_request.comment_control` field +``` diff --git a/google-beta/resource_cloud_build_trigger.go b/google-beta/resource_cloud_build_trigger.go index c074d85373..d1ab0ed7aa 100644 --- a/google-beta/resource_cloud_build_trigger.go +++ b/google-beta/resource_cloud_build_trigger.go @@ -678,8 +678,8 @@ https://github.com/googlecloudplatform/cloud-builders is "googlecloudplatform".` "comment_control": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.StringInSlice([]string{"COMMENTS_DISABLED", "COMMENTS_ENABLED", ""}, false), - Description: `Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. Possible values: ["COMMENTS_DISABLED", "COMMENTS_ENABLED"]`, + ValidateFunc: validation.StringInSlice([]string{"COMMENTS_DISABLED", "COMMENTS_ENABLED", "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY", ""}, false), + Description: `Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. Possible values: ["COMMENTS_DISABLED", "COMMENTS_ENABLED", "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"]`, }, "invert_regex": { Type: schema.TypeBool, diff --git a/website/docs/r/cloudbuild_trigger.html.markdown b/website/docs/r/cloudbuild_trigger.html.markdown index afe14e485b..f6eb418bdc 100644 --- a/website/docs/r/cloudbuild_trigger.html.markdown +++ b/website/docs/r/cloudbuild_trigger.html.markdown @@ -270,7 +270,7 @@ The `pull_request` block supports: * `comment_control` - (Optional) Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. - Possible values are `COMMENTS_DISABLED` and `COMMENTS_ENABLED`. + Possible values are `COMMENTS_DISABLED`, `COMMENTS_ENABLED`, and `COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY`. * `invert_regex` - (Optional)