pub struct Rules {Show 17 fields
pub required_status_checks: Option<StatusChecksRule>,
pub pull_request: Option<PullRequestRule>,
pub required_signatures: bool,
pub non_fast_forward: bool,
pub deletion: bool,
pub creation: bool,
pub required_linear_history: bool,
pub update: Option<UpdateRule>,
pub required_deployments: Option<DeploymentsRule>,
pub commit_message_pattern: Option<PatternRule>,
pub commit_author_email_pattern: Option<PatternRule>,
pub committer_email_pattern: Option<PatternRule>,
pub branch_name_pattern: Option<PatternRule>,
pub tag_name_pattern: Option<PatternRule>,
pub workflows: Option<WorkflowsRule>,
pub code_scanning: Option<CodeScanningRule>,
pub merge_queue: Option<MergeQueueRule>,
}Expand description
The rules of a ruleset. A false switch and a null rule are absent.
Fields§
§required_status_checks: Option<StatusChecksRule>Require status checks to pass.
pull_request: Option<PullRequestRule>Require changes to arrive through a pull request.
required_signatures: boolRequire signed commits.
non_fast_forward: boolBlock force pushes.
deletion: boolBlock deleting matching refs.
creation: boolBlock creating matching refs.
required_linear_history: boolRequire a linear history.
update: Option<UpdateRule>Restrict updating matching refs.
required_deployments: Option<DeploymentsRule>Require successful deployments.
commit_message_pattern: Option<PatternRule>Require commit messages to match a pattern.
Require commit author emails to match a pattern.
committer_email_pattern: Option<PatternRule>Require committer emails to match a pattern.
branch_name_pattern: Option<PatternRule>Require branch names to match a pattern.
tag_name_pattern: Option<PatternRule>Require tag names to match a pattern.
workflows: Option<WorkflowsRule>Require workflows to pass.
code_scanning: Option<CodeScanningRule>Require code scanning results.
merge_queue: Option<MergeQueueRule>Require a merge queue.
Implementations§
Source§impl Rules
impl Rules
Sourcepub(crate) fn entries(&self) -> Vec<RuleRef<'_>>
pub(crate) fn entries(&self) -> Vec<RuleRef<'_>>
The rules in the order they are written to GitHub.
Trait Implementations§
impl Eq for Rules
impl StructuralPartialEq for Rules
Auto Trait Implementations§
impl Freeze for Rules
impl RefUnwindSafe for Rules
impl Send for Rules
impl Sync for Rules
impl Unpin for Rules
impl UnsafeUnpin for Rules
impl UnwindSafe for Rules
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.