Class: Google::Apis::CloudbuildV1::PullRequestFilter

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1/classes.rb,
lib/google/apis/cloudbuild_v1/representations.rb,
lib/google/apis/cloudbuild_v1/representations.rb

Overview

PullRequestFilter contains filter properties for matching GitHub Pull Requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PullRequestFilter

Returns a new instance of PullRequestFilter.



3420
3421
3422
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3420

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#branchString

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 Corresponds to the JSON property branch

Returns:

  • (String)


3402
3403
3404
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3402

def branch
  @branch
end

#comment_controlString

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. Corresponds to the JSON property commentControl

Returns:

  • (String)


3412
3413
3414
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3412

def comment_control
  @comment_control
end

#invert_regexBoolean Also known as: invert_regex?

If true, branches that do NOT match the git_ref will trigger a build. Corresponds to the JSON property invertRegex

Returns:

  • (Boolean)


3417
3418
3419
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3417

def invert_regex
  @invert_regex
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3425
3426
3427
3428
3429
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 3425

def update!(**args)
  @branch = args[:branch] if args.key?(:branch)
  @comment_control = args[:comment_control] if args.key?(:comment_control)
  @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
end