Skip to content

Commit

Permalink
Turn RequiredStatusChecks Checks and Contexts into pointers (#3070
Browse files Browse the repository at this point in the history
)

Fixes: #2976 and #2467.
  • Loading branch information
emmahsax committed Feb 11, 2024
1 parent 5145e7f commit dd4d2a1
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 27 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.

16 changes: 8 additions & 8 deletions github/repos.go
Expand Up @@ -1191,20 +1191,20 @@ type RequiredStatusChecks struct {
// 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
// branch. (Deprecated. Note: only one of Contexts/Checks can be populated,
// but at least one must be populated).
Contexts []string `json:"contexts,omitempty"`
// branch. An empty slice is valid. (Deprecated. Note: only one of
// Contexts/Checks can be populated, but at least one must be populated).
Contexts *[]string `json:"contexts,omitempty"`
// The list of status checks to require in order to merge into this
// branch.
Checks []*RequiredStatusCheck `json:"checks,omitempty"`
ContextsURL *string `json:"contexts_url,omitempty"`
URL *string `json:"url,omitempty"`
// branch. An empty slice is valid.
Checks *[]*RequiredStatusCheck `json:"checks,omitempty"`
ContextsURL *string `json:"contexts_url,omitempty"`
URL *string `json:"url,omitempty"`
}

// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks.
type RequiredStatusChecksRequest struct {
Strict *bool `json:"strict,omitempty"`
// Note: if both Contexts and Checks are populated,
// Deprecated. Note: if both Contexts and Checks are populated,
// the GitHub API will only use Checks.
Contexts []string `json:"contexts,omitempty"`
Checks []*RequiredStatusCheck `json:"checks,omitempty"`
Expand Down

0 comments on commit dd4d2a1

Please sign in to comment.