Skip to content

Commit

Permalink
Add LockBranch and AllowForkSyncing to repos.go (#2577)
Browse files Browse the repository at this point in the history
Fixes: #2574.
  • Loading branch information
XaurDesu committed Nov 28, 2022
1 parent 621c4ba commit 18cd63d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/github-accessors.go

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

20 changes: 20 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.

4 changes: 4 additions & 0 deletions github/repos.go
Expand Up @@ -840,6 +840,10 @@ type Protection struct {
AllowForcePushes *AllowForcePushes `json:"allow_force_pushes"`
AllowDeletions *AllowDeletions `json:"allow_deletions"`
RequiredConversationResolution *RequiredConversationResolution `json:"required_conversation_resolution"`
// LockBranch represents if the branch is marked as read-only. If this is true, users will not be able to push to the branch.
LockBranch *bool `json:"lock_branch,omitempty"`
// AllowForkSyncing represents whether users can pull changes from upstream when the branch is locked.
AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"`
}

// BranchProtectionRule represents the rule applied to a repositories branch.
Expand Down

0 comments on commit 18cd63d

Please sign in to comment.