Skip to content

Commit 4caa1d6

Browse files
authored
Add fields to Branch Protection endpoint (#2744)
Fixes: #2719.
1 parent 4fec23d commit 4caa1d6

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

github/github-accessors.go

Lines changed: 32 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: 37 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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,8 @@ type Protection struct {
847847
BlockCreations *BlockCreations `json:"block_creations,omitempty"`
848848
LockBranch *LockBranch `json:"lock_branch,omitempty"`
849849
AllowForkSyncing *AllowForkSyncing `json:"allow_fork_syncing,omitempty"`
850+
RequiredSignatures *SignaturesProtectedBranch `json:"required_signatures,omitempty"`
851+
URL *string `json:"url,omitempty"`
850852
}
851853

852854
// BlockCreations represents whether users can push changes that create branches. If this is true, this
@@ -1023,7 +1025,9 @@ type RequiredStatusChecks struct {
10231025
Contexts []string `json:"contexts,omitempty"`
10241026
// The list of status checks to require in order to merge into this
10251027
// branch.
1026-
Checks []*RequiredStatusCheck `json:"checks"`
1028+
Checks []*RequiredStatusCheck `json:"checks"`
1029+
ContextsURL *string `json:"contexts_url,omitempty"`
1030+
URL *string `json:"url,omitempty"`
10271031
}
10281032

10291033
// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks.

0 commit comments

Comments
 (0)