Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use SignaturesProtectedBranch instead of RequiredSignatures and `…
…URL` instead of `Url`
  • Loading branch information
yardenshoham committed Apr 9, 2023
commit 386f4bcb2ce113f0cdf9d923c122dbef12387332
26 changes: 13 additions & 13 deletions github/github-accessors.go

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

30 changes: 15 additions & 15 deletions github/github-accessors_test.go

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

13 changes: 4 additions & 9 deletions github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,6 @@ type Branch struct {
Protected *bool `json:"protected,omitempty"`
}

type RequiredSignatures struct {
Url string `json:"url"`
Enabled bool `json:"enabled"`
}

// Protection represents a repository branch's protection.
type Protection struct {
RequiredStatusChecks *RequiredStatusChecks `json:"required_status_checks"`
Expand All @@ -852,8 +847,8 @@ type Protection struct {
BlockCreations *BlockCreations `json:"block_creations,omitempty"`
LockBranch *LockBranch `json:"lock_branch,omitempty"`
AllowForkSyncing *AllowForkSyncing `json:"allow_fork_syncing,omitempty"`
RequiredSignatures *RequiredSignatures `json:"required_signatures,omitempty"`
Url *string `json:"url,omitempty"`
RequiredSignatures *SignaturesProtectedBranch `json:"required_signatures,omitempty"`
URL *string `json:"url,omitempty"`
}

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

// RequiredStatusChecks represents the protection status of a individual branch.
type RequiredStatusChecks struct {
Url *string `json:"url,omitempty"`
ContextsUrl *string `json:"contexts_url,omitempty"`
URL *string `json:"url,omitempty"`
ContextsURL *string `json:"contexts_url,omitempty"`
// Require branches to be up to date before merging. (Required.)
Strict bool `json:"strict"`
// The list of status checks to require in order to merge into this
Expand Down