pub struct EditBranchProtectionOption {Show 23 fields
pub apply_to_admins: Option<bool>,
pub approvals_whitelist_teams: Option<Vec<String>>,
pub approvals_whitelist_username: Option<Vec<String>>,
pub block_on_official_review_requests: Option<bool>,
pub block_on_outdated_branch: Option<bool>,
pub block_on_rejected_reviews: Option<bool>,
pub dismiss_stale_approvals: Option<bool>,
pub enable_approvals_whitelist: Option<bool>,
pub enable_merge_whitelist: Option<bool>,
pub enable_push: Option<bool>,
pub enable_push_whitelist: Option<bool>,
pub enable_status_check: Option<bool>,
pub ignore_stale_approvals: Option<bool>,
pub merge_whitelist_teams: Option<Vec<String>>,
pub merge_whitelist_usernames: Option<Vec<String>>,
pub protected_file_patterns: Option<String>,
pub push_whitelist_deploy_keys: Option<bool>,
pub push_whitelist_teams: Option<Vec<String>>,
pub push_whitelist_usernames: Option<Vec<String>>,
pub require_signed_commits: Option<bool>,
pub required_approvals: Option<i64>,
pub status_check_contexts: Option<Vec<String>>,
pub unprotected_file_patterns: Option<String>,
}Expand description
The managed subset of EditBranchProtectionOption.
Pointers with omitempty, so only the differing properties are sent.
Fields§
§apply_to_admins: Option<bool>Whether the protection also applies to repository administrators.
approvals_whitelist_teams: Option<Vec<String>>The teams whose approvals count, when the approvals whitelist is on.
approvals_whitelist_username: Option<Vec<String>>The users whose approvals count, when the approvals whitelist is on.
block_on_official_review_requests: Option<bool>Whether an official code owner review request blocks merging until resolved.
block_on_outdated_branch: Option<bool>Whether merging is blocked while the branch is behind its base.
block_on_rejected_reviews: Option<bool>Whether a requested change blocks merging until it is resolved.
dismiss_stale_approvals: Option<bool>Whether a new commit dismisses existing approvals.
enable_approvals_whitelist: Option<bool>Whether only the approvals whitelist counts toward the required approvals.
enable_merge_whitelist: Option<bool>Whether only the merge whitelist may merge.
enable_push: Option<bool>Whether direct pushes to the branch are allowed at all.
enable_push_whitelist: Option<bool>Whether only the push whitelist may push.
enable_status_check: Option<bool>Whether status checks must pass before merging.
ignore_stale_approvals: Option<bool>Whether approvals on an outdated commit stop counting.
merge_whitelist_teams: Option<Vec<String>>The teams that may merge, when the merge whitelist is on.
merge_whitelist_usernames: Option<Vec<String>>The users that may merge, when the merge whitelist is on.
protected_file_patterns: Option<String>Semicolon separated glob patterns for files that only whitelisted pushers may change.
push_whitelist_deploy_keys: Option<bool>Whether deploy keys may push, when the push whitelist is on.
push_whitelist_teams: Option<Vec<String>>The teams that may push, when the push whitelist is on.
push_whitelist_usernames: Option<Vec<String>>The users that may push, when the push whitelist is on.
require_signed_commits: Option<bool>Whether every commit on the branch must be signed.
required_approvals: Option<i64>The number of approving reviews required before merging.
status_check_contexts: Option<Vec<String>>The status check contexts that must report success.
unprotected_file_patterns: Option<String>Semicolon separated glob patterns for files that any pusher may change despite the protected patterns.
Implementations§
Source§impl EditBranchProtectionOption
impl EditBranchProtectionOption
Sourcepub fn between(
desired: &BranchRule,
actual: &BranchProtection,
) -> (Self, FieldDiff)
pub fn between( desired: &BranchRule, actual: &BranchProtection, ) -> (Self, FieldDiff)
The body that writes the differences of desired from actual, with
the comparison of every field.
Sourcepub const fn carry_push(&mut self, push: PushAccess)
pub const fn carry_push(&mut self, push: PushAccess)
Carry both push flags. Forgejo only applies the whitelist and deploy
key flags when enable_push is in the same payload.
Trait Implementations§
Source§impl Clone for EditBranchProtectionOption
impl Clone for EditBranchProtectionOption
Source§fn clone(&self) -> EditBranchProtectionOption
fn clone(&self) -> EditBranchProtectionOption
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditBranchProtectionOption
impl Debug for EditBranchProtectionOption
Source§impl Default for EditBranchProtectionOption
impl Default for EditBranchProtectionOption
Source§fn default() -> EditBranchProtectionOption
fn default() -> EditBranchProtectionOption
impl Eq for EditBranchProtectionOption
Source§impl<'ʄ> Facet<'ʄ> for EditBranchProtectionOption
impl<'ʄ> Facet<'ʄ> for EditBranchProtectionOption
impl StructuralPartialEq for EditBranchProtectionOption
Auto Trait Implementations§
impl Freeze for EditBranchProtectionOption
impl RefUnwindSafe for EditBranchProtectionOption
impl Send for EditBranchProtectionOption
impl Sync for EditBranchProtectionOption
impl Unpin for EditBranchProtectionOption
impl UnsafeUnpin for EditBranchProtectionOption
impl UnwindSafe for EditBranchProtectionOption
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
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
key and return true if they are equal.