+
Skip to content

fix: Add missing require_last_push_approval field to branch protection rule event structs #3623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载