pub struct Protection {Show 15 fields
pub trunk_ruleset: Option<String>,
pub tag_ruleset: String,
pub lines_ruleset: String,
pub title_check: String,
pub tag_pattern: String,
pub bypass_actors: Vec<String>,
pub allowed_merge_methods: Vec<String>,
pub strict_required_status_checks: bool,
pub owned_trunk_rules: Vec<String>,
pub required_approving_review_count: i64,
pub dismiss_stale_reviews_on_push: bool,
pub require_code_owner_review: bool,
pub require_last_push_approval: bool,
pub github: Github,
pub gitlab: Gitlab,
}Expand description
The protection table.
Fields§
§trunk_ruleset: Option<String>N: trunk ruleset name. Absent derives <trunk>-protection, which
is the name the setup script built before the key existed, so a
target that states none keeps the ruleset it already has.
tag_ruleset: StringN: tag ruleset name.
lines_ruleset: StringN: release-line ruleset name.
title_check: StringN: title job context.
tag_pattern: StringF: invariant, covers every published version.
bypass_actors: Vec<String>F: invariant, empty.
allowed_merge_methods: Vec<String>F: invariant, exactly squash.
strict_required_status_checks: boolF: invariant, true.
owned_trunk_rules: Vec<String>F: invariant, contains all four rules.
required_approving_review_count: i64F: floor zero; higher is stricter.
dismiss_stale_reviews_on_push: boolF: floor false; true is stricter.
require_code_owner_review: boolF: floor false; true is stricter.
require_last_push_approval: boolF: floor false; true is stricter.
github: GithubGitHub policy.
gitlab: GitlabGitLab policy.
Implementations§
Source§impl Protection
impl Protection
Sourcepub fn trunk_ruleset(&self, trunk: &str) -> String
pub fn trunk_ruleset(&self, trunk: &str) -> String
The trunk ruleset’s name: the target’s own answer, or the name the setup script derived before the key existed.
Trait Implementations§
Source§impl Clone for Protection
impl Clone for Protection
Source§fn clone(&self) -> Protection
fn clone(&self) -> Protection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Protection
impl Debug for Protection
Source§impl Default for Protection
impl Default for Protection
Source§impl<'de> Deserialize<'de> for Protectionwhere
Protection: Default,
impl<'de> Deserialize<'de> for Protectionwhere
Protection: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Protection
Source§impl PartialEq for Protection
impl PartialEq for Protection
impl StructuralPartialEq for Protection
Auto Trait Implementations§
impl Freeze for Protection
impl RefUnwindSafe for Protection
impl Send for Protection
impl Sync for Protection
impl Unpin for Protection
impl UnsafeUnpin for Protection
impl UnwindSafe for Protection
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.