Skip to content

Commit 18cd63d

Browse files
authored
Add LockBranch and AllowForkSyncing to repos.go (#2577)
Fixes: #2574.
1 parent 621c4ba commit 18cd63d

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

github/github-accessors.go

Lines changed: 16 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: 20 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
@@ -840,6 +840,10 @@ type Protection struct {
840840
AllowForcePushes *AllowForcePushes `json:"allow_force_pushes"`
841841
AllowDeletions *AllowDeletions `json:"allow_deletions"`
842842
RequiredConversationResolution *RequiredConversationResolution `json:"required_conversation_resolution"`
843+
// LockBranch represents if the branch is marked as read-only. If this is true, users will not be able to push to the branch.
844+
LockBranch *bool `json:"lock_branch,omitempty"`
845+
// AllowForkSyncing represents whether users can pull changes from upstream when the branch is locked.
846+
AllowForkSyncing *bool `json:"allow_fork_syncing,omitempty"`
843847
}
844848

845849
// BranchProtectionRule represents the rule applied to a repositories branch.

0 commit comments

Comments
 (0)