#[non_exhaustive]pub struct PullRequestFilter {
pub comment_control: CommentControl,
pub invert_regex: bool,
pub git_ref: Option<GitRef>,
/* private fields */
}Expand description
PullRequestFilter contains filter properties for matching GitHub Pull Requests.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.comment_control: CommentControlIf 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.
invert_regex: boolIf true, branches that do NOT match the git_ref will trigger a build.
git_ref: Option<GitRef>Target refs to match. A target ref is the git reference where the pull request will be applied.
Implementations§
Source§impl PullRequestFilter
impl PullRequestFilter
pub fn new() -> Self
Sourcepub fn set_comment_control<T: Into<CommentControl>>(self, v: T) -> Self
pub fn set_comment_control<T: Into<CommentControl>>(self, v: T) -> Self
Sets the value of comment_control.
§Example
ⓘ
use google_cloud_build_v1::model::pull_request_filter::CommentControl;
let x0 = PullRequestFilter::new().set_comment_control(CommentControl::CommentsEnabled);
let x1 = PullRequestFilter::new().set_comment_control(CommentControl::CommentsEnabledForExternalContributorsOnly);Sourcepub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
pub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_git_ref<T: Into<Option<GitRef>>>(self, v: T) -> Self
pub fn set_git_ref<T: Into<Option<GitRef>>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for PullRequestFilter
impl Clone for PullRequestFilter
Source§fn clone(&self) -> PullRequestFilter
fn clone(&self) -> PullRequestFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PullRequestFilter
impl Debug for PullRequestFilter
Source§impl Default for PullRequestFilter
impl Default for PullRequestFilter
Source§fn default() -> PullRequestFilter
fn default() -> PullRequestFilter
Returns the “default value” for a type. Read more
Source§impl Message for PullRequestFilter
impl Message for PullRequestFilter
Source§impl PartialEq for PullRequestFilter
impl PartialEq for PullRequestFilter
impl StructuralPartialEq for PullRequestFilter
Auto Trait Implementations§
impl Freeze for PullRequestFilter
impl RefUnwindSafe for PullRequestFilter
impl Send for PullRequestFilter
impl Sync for PullRequestFilter
impl Unpin for PullRequestFilter
impl UnwindSafe for PullRequestFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more