Skip to content

Commit cb24cab

Browse files
authored
Add the 'require_last_push_approval' field (#2567)
1 parent cbfb001 commit cb24cab

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/repos.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,8 @@ type PullRequestReviewsEnforcement struct {
10281028
// RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged.
10291029
// Valid values are 1-6.
10301030
RequiredApprovingReviewCount int `json:"required_approving_review_count"`
1031+
// RequireLastPushApproval specifies whether the last pusher to a pull request branch can approve it.
1032+
RequireLastPushApproval bool `json:"require_last_push_approval"`
10311033
}
10321034

10331035
// PullRequestReviewsEnforcementRequest represents request to set the pull request review
@@ -1064,6 +1066,8 @@ type PullRequestReviewsEnforcementUpdate struct {
10641066
// RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged.
10651067
// Valid values are 1 - 6 or 0 to not require reviewers.
10661068
RequiredApprovingReviewCount int `json:"required_approving_review_count"`
1069+
// RequireLastPushApproval specifies whether the last pusher to a pull request branch can approve it.
1070+
RequireLastPushApproval *bool `json:"require_last_push_approval,omitempty"`
10671071
}
10681072

10691073
// RequireLinearHistory represents the configuration to enforce branches with no merge commit.

0 commit comments

Comments
 (0)