Class: Google::Cloud::Build::V1::PullRequestFilter

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb

Overview

PullRequestFilter contains filter properties for matching GitHub Pull Requests.

Defined Under Namespace

Modules: CommentControl

Instance Attribute Summary collapse

Instance Attribute Details

#branch::String

Returns Regex of branches to match.

The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax.

Returns:



1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1917

class PullRequestFilter
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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.
  module CommentControl
    # 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_DISABLED = 0

    # Builds will only fire in response to pull requests if:
    # 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 = 1

    # Builds will only fire in response to pull requests if:
    # 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.
    COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
  end
end

#comment_control::Google::Cloud::Build::V1::PullRequestFilter::CommentControl

Returns If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds.

If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.

Returns:

  • (::Google::Cloud::Build::V1::PullRequestFilter::CommentControl)

    If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds.

    If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.



1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1917

class PullRequestFilter
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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.
  module CommentControl
    # 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_DISABLED = 0

    # Builds will only fire in response to pull requests if:
    # 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 = 1

    # Builds will only fire in response to pull requests if:
    # 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.
    COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
  end
end

#invert_regex::Boolean

Returns If true, branches that do NOT match the git_ref will trigger a build.

Returns:

  • (::Boolean)

    If true, branches that do NOT match the git_ref will trigger a build.



1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
# File 'proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb', line 1917

class PullRequestFilter
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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.
  module CommentControl
    # 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_DISABLED = 0

    # Builds will only fire in response to pull requests if:
    # 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 = 1

    # Builds will only fire in response to pull requests if:
    # 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.
    COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2
  end
end