Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ type BranchProtectionRule struct {
RequiredConversationResolutionLevel *string `json:"required_conversation_resolution_level,omitempty"`
AuthorizedActorsOnly *bool `json:"authorized_actors_only,omitempty"`
AuthorizedActorNames []string `json:"authorized_actor_names,omitempty"`
RequireLastPushApproval *bool `json:"require_last_push_approval,omitempty"`
}

// ProtectionChanges represents the changes to the rule if the BranchProtection was edited.
Expand All @@ -1093,6 +1094,7 @@ type ProtectionChanges struct {
RequiredStatusChecks *RequiredStatusChecksChanges `json:"required_status_checks,omitempty"`
RequiredStatusChecksEnforcementLevel *RequiredStatusChecksEnforcementLevelChanges `json:"required_status_checks_enforcement_level,omitempty"`
SignatureRequirementEnforcementLevel *SignatureRequirementEnforcementLevelChanges `json:"signature_requirement_enforcement_level,omitempty"`
RequireLastPushApproval *RequireLastPushApprovalChanges `json:"require_last_push_approval,omitempty"`
}

// AdminEnforcedChanges represents the changes made to the AdminEnforced policy.
Expand Down Expand Up @@ -1170,6 +1172,11 @@ type SignatureRequirementEnforcementLevelChanges struct {
From *string `json:"from,omitempty"`
}

// RequireLastPushApprovalChanges represents the changes made to the RequireLastPushApproval policy.
type RequireLastPushApprovalChanges struct {
From *bool `json:"from,omitempty"`
}

// ProtectionRequest represents a request to create/edit a branch's protection.
type ProtectionRequest struct {
RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"`
Expand Down
Loading