pub struct BranchProtectionRule {Show 26 fields
pub admin_enforced: BranchProtectionRuleBoolean,
pub allow_deletions_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub allow_force_pushes_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub authorized_actor_names: BranchProtectionRuleArray,
pub authorized_actors_only: BranchProtectionRuleBoolean,
pub authorized_dismissal_actors_only: BranchProtectionRuleBoolean,
pub create_protected: Option<BranchProtectionRuleBoolean>,
pub created_at: DateTime<Utc>,
pub dismiss_stale_reviews_on_push: BranchProtectionRuleBoolean,
pub id: i64,
pub ignore_approvals_from_contributors: BranchProtectionRuleBoolean,
pub linear_history_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub merge_queue_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub name: String,
pub pull_request_reviews_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub repository_id: i64,
pub require_code_owner_review: BranchProtectionRuleBoolean,
pub require_last_push_approval: Option<BranchProtectionRuleBoolean>,
pub required_approving_review_count: BranchProtectionRuleNumber,
pub required_conversation_resolution_level: BranchProtectionRuleEnforcementLevel,
pub required_deployments_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub required_status_checks: BranchProtectionRuleArray,
pub required_status_checks_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub signature_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel,
pub strict_required_status_checks_policy: BranchProtectionRuleBoolean,
pub updated_at: DateTime<Utc>,
}
Expand description
The branch protection rule. Includes a name
and all the branch protection settings applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of off
, non_admins
, or everyone
. Actor and build lists are arrays of strings.
JSON schema
{
"title": "branch protection rule",
"description": "The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings.",
"type": "object",
"required": [
"admin_enforced",
"allow_deletions_enforcement_level",
"allow_force_pushes_enforcement_level",
"authorized_actor_names",
"authorized_actors_only",
"authorized_dismissal_actors_only",
"created_at",
"dismiss_stale_reviews_on_push",
"id",
"ignore_approvals_from_contributors",
"linear_history_requirement_enforcement_level",
"merge_queue_enforcement_level",
"name",
"pull_request_reviews_enforcement_level",
"repository_id",
"require_code_owner_review",
"required_approving_review_count",
"required_conversation_resolution_level",
"required_deployments_enforcement_level",
"required_status_checks",
"required_status_checks_enforcement_level",
"signature_requirement_enforcement_level",
"strict_required_status_checks_policy",
"updated_at"
],
"properties": {
"admin_enforced": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"allow_deletions_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"allow_force_pushes_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"authorized_actor_names": {
"$ref": "#/definitions/branch-protection-rule-array"
},
"authorized_actors_only": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"authorized_dismissal_actors_only": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"create_protected": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"dismiss_stale_reviews_on_push": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"id": {
"type": "integer"
},
"ignore_approvals_from_contributors": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"linear_history_requirement_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"merge_queue_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"name": {
"type": "string"
},
"pull_request_reviews_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"repository_id": {
"type": "integer"
},
"require_code_owner_review": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"require_last_push_approval": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"required_approving_review_count": {
"$ref": "#/definitions/branch-protection-rule-number"
},
"required_conversation_resolution_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"required_deployments_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"required_status_checks": {
"$ref": "#/definitions/branch-protection-rule-array"
},
"required_status_checks_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"signature_requirement_enforcement_level": {
"$ref": "#/definitions/branch-protection-rule-enforcement-level"
},
"strict_required_status_checks_policy": {
"$ref": "#/definitions/branch-protection-rule-boolean"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema"
}
Fields§
§admin_enforced: BranchProtectionRuleBoolean
§allow_deletions_enforcement_level: BranchProtectionRuleEnforcementLevel
§allow_force_pushes_enforcement_level: BranchProtectionRuleEnforcementLevel
§create_protected: Option<BranchProtectionRuleBoolean>
§created_at: DateTime<Utc>
§dismiss_stale_reviews_on_push: BranchProtectionRuleBoolean
§id: i64
§ignore_approvals_from_contributors: BranchProtectionRuleBoolean
§linear_history_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel
§merge_queue_enforcement_level: BranchProtectionRuleEnforcementLevel
§name: String
§pull_request_reviews_enforcement_level: BranchProtectionRuleEnforcementLevel
§repository_id: i64
§require_code_owner_review: BranchProtectionRuleBoolean
§require_last_push_approval: Option<BranchProtectionRuleBoolean>
§required_approving_review_count: BranchProtectionRuleNumber
§required_conversation_resolution_level: BranchProtectionRuleEnforcementLevel
§required_deployments_enforcement_level: BranchProtectionRuleEnforcementLevel
§required_status_checks: BranchProtectionRuleArray
§required_status_checks_enforcement_level: BranchProtectionRuleEnforcementLevel
§signature_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel
§strict_required_status_checks_policy: BranchProtectionRuleBoolean
§updated_at: DateTime<Utc>
Implementations§
Source§impl BranchProtectionRule
impl BranchProtectionRule
pub fn builder() -> BranchProtectionRule
Trait Implementations§
Source§impl Clone for BranchProtectionRule
impl Clone for BranchProtectionRule
Source§fn clone(&self) -> BranchProtectionRule
fn clone(&self) -> BranchProtectionRule
Returns a duplicate of the value. Read more
1.0.0 · 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 BranchProtectionRule
impl Debug for BranchProtectionRule
Source§impl<'de> Deserialize<'de> for BranchProtectionRule
impl<'de> Deserialize<'de> for BranchProtectionRule
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
Source§impl From<&BranchProtectionRule> for BranchProtectionRule
impl From<&BranchProtectionRule> for BranchProtectionRule
Source§fn from(value: &BranchProtectionRule) -> Self
fn from(value: &BranchProtectionRule) -> Self
Converts to this type from the input type.
Source§impl From<BranchProtectionRule> for BranchProtectionRule
impl From<BranchProtectionRule> for BranchProtectionRule
Source§fn from(value: BranchProtectionRule) -> Self
fn from(value: BranchProtectionRule) -> Self
Converts to this type from the input type.
Source§impl Serialize for BranchProtectionRule
impl Serialize for BranchProtectionRule
Auto Trait Implementations§
impl Freeze for BranchProtectionRule
impl RefUnwindSafe for BranchProtectionRule
impl Send for BranchProtectionRule
impl Sync for BranchProtectionRule
impl Unpin for BranchProtectionRule
impl UnwindSafe for BranchProtectionRule
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