Skip to content

Commit 386f4bc

Browse files
committed
Use SignaturesProtectedBranch instead of RequiredSignatures and URL instead of Url
1 parent 14b3be5 commit 386f4bc

File tree

3 files changed

+32
-37
lines changed

3 files changed

+32
-37
lines changed

github/github-accessors.go

Lines changed: 13 additions & 13 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: 15 additions & 15 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 & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -834,11 +834,6 @@ type Branch struct {
834834
Protected *bool `json:"protected,omitempty"`
835835
}
836836

837-
type RequiredSignatures struct {
838-
Url string `json:"url"`
839-
Enabled bool `json:"enabled"`
840-
}
841-
842837
// Protection represents a repository branch's protection.
843838
type Protection struct {
844839
RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"`
@@ -852,8 +847,8 @@ type Protection struct {
852847
BlockCreations *BlockCreations `json:"block_creations,omitempty"`
853848
LockBranch *LockBranch `json:"lock_branch,omitempty"`
854849
AllowForkSyncing *AllowForkSyncing `json:"allow_fork_syncing,omitempty"`
855-
RequiredSignatures *RequiredSignatures `json:"required_signatures,omitempty"`
856-
Url *string `json:"url,omitempty"`
850+
RequiredSignatures *SignaturesProtectedBranch `json:"required_signatures,omitempty"`
851+
URL *string `json:"url,omitempty"`
857852
}
858853

859854
// BlockCreations represents whether users can push changes that create branches. If this is true, this
@@ -1022,8 +1017,8 @@ type ProtectionRequest struct {
10221017

10231018
// RequiredStatusChecks represents the protection status of a individual branch.
10241019
type RequiredStatusChecks struct {
1025-
Url *string `json:"url,omitempty"`
1026-
ContextsUrl *string `json:"contexts_url,omitempty"`
1020+
URL *string `json:"url,omitempty"`
1021+
ContextsURL *string `json:"contexts_url,omitempty"`
10271022
// Require branches to be up to date before merging. (Required.)
10281023
Strict bool `json:"strict"`
10291024
// The list of status checks to require in order to merge into this

0 commit comments

Comments
 (0)