#[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
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.comment_control: 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.
invert_regex: bool
If 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.
Sourcepub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
pub fn set_invert_regex<T: Into<bool>>(self, v: T) -> Self
Sets the value of invert_regex.
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
Sets the value of git_ref.
Note that all the setters affecting git_ref
are mutually
exclusive.
Sourcepub fn branch(&self) -> Option<&String>
pub fn branch(&self) -> Option<&String>
The value of git_ref
if it holds a Branch
, None
if the field is not set or
holds a different branch.
Sourcepub fn set_branch<T: Into<String>>(self, v: T) -> Self
pub fn set_branch<T: Into<String>>(self, v: T) -> Self
Sets the value of git_ref
to hold a Branch
.
Note that all the setters affecting git_ref
are
mutually exclusive.
Trait Implementations§
Source§impl Clone for PullRequestFilter
impl Clone for PullRequestFilter
Source§fn clone(&self) -> PullRequestFilter
fn clone(&self) -> PullRequestFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more