Struct octorust::types::ReposUpdateBranchProtectionRequest [−][src]
pub struct ReposUpdateBranchProtectionRequest { pub allow_deletions: bool, pub allow_force_pushes: bool, pub enforce_admins: bool, pub required_conversation_resolution: bool, pub required_linear_history: bool, pub required_pull_request_reviews: Option<ReposUpdateBranchProtectionRequestRequiredPullReviews>, pub required_status_checks: Option<ReposUpdateBranchProtectionRequestRequiredStatusChecks>, pub restrictions: Option<Restrictions>, }
Fields
allow_deletions: bool
Allows deletion of the protected branch by anyone with write access to the repository. Set to false
to prevent deletion of the protected branch. Default: false
. For more information, see “Enabling force pushes to a protected branch” in the GitHub Help documentation.
allow_force_pushes: bool
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true
to allow force pushes. Set to false
or null
to block force pushes. Default: false
. For more information, see “Enabling force pushes to a protected branch” in the GitHub Help documentation.“
enforce_admins: bool
Enforce all configured restrictions for administrators. Set to true
to enforce required status checks for repository administrators. Set to null
to disable.
required_conversation_resolution: bool
Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to false
to disable. Default: false
.
required_linear_history: bool
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true
to enforce a linear commit history. Set to false
to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false
. For more information, see “Requiring a linear commit history” in the GitHub Help documentation.
required_pull_request_reviews: Option<ReposUpdateBranchProtectionRequestRequiredPullReviews>
Require at least one approving review on a pull request, before merging. Set to null
to disable.
required_status_checks: Option<ReposUpdateBranchProtectionRequestRequiredStatusChecks>
Require status checks to pass before merging. Set to null
to disable.
restrictions: Option<Restrictions>
Restrict who can push to the protected branch. User, app, and team restrictions
are only available for organization-owned repositories. Set to null
to disable.
Trait Implementations
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
Auto Trait Implementations
impl Send for ReposUpdateBranchProtectionRequest
impl Sync for ReposUpdateBranchProtectionRequest
impl Unpin for ReposUpdateBranchProtectionRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more