# Cloud Build V1 API - Module Google::Cloud::Build::V1::PullRequestFilter::CommentControl (v1.12.0)

1.12.0 (latest) 1.11.0 1.10.0 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.27.1 0.26.2 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.3 Reference documentation and code samples for the Cloud Build V1 API module Google::Cloud::Build::V1::PullRequestFilter::CommentControl.

Controls whether or not a `/gcbrun` comment is required from a user with
repository write permission or above in order to
trigger Build runs for pull requests. Pull Request update events differ
between repo types.
Check repo specific guides
([GitHub](https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github-enterprise#creating_a_github_enterprise_trigger),
[Bitbucket](https://cloud.google.com/build/docs/automating-builds/bitbucket/build-repos-from-bitbucket-server#creating_a_bitbucket_server_trigger),
[GitLab](https://cloud.google.com/build/docs/automating-builds/gitlab/build-repos-from-gitlab#creating_a_gitlab_trigger)
for details.

## Constants

### COMMENTS_DISABLED

**value:** 0  
Do not require `/gcbrun` comments from a user with repository write
permission or above on pull requests before builds are triggered.
Comments that contain `/gcbrun` will still fire builds so this should
be thought of as comments not required.

### COMMENTS_ENABLED

**value:** 1  

Builds will only fire in response to pull requests if:

<br />

1. The pull request author has repository write permission or above and `/gcbrun` is in the PR description.
2. A user with repository writer permissions or above comments `/gcbrun` on a pull request authored by any user.

### COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY

**value:** 2  

Builds will only fire in response to pull requests if:

<br />

1. The pull request author is a repository writer or above.
2. If the author does not have write permissions, a user with write permissions or above must comment `/gcbrun` in order to fire a build.