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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The name of the generated JSON Schema. Read more

Generates a JSON Schema for this type. Read more

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.