Skip to content

Commit

Permalink
Add AllowUpdateBranch to the Repository struct (#2313)
Browse files Browse the repository at this point in the history
Fixes: #2312.
  • Loading branch information
MarkRosemaker committed Mar 15, 2022
1 parent b4e931b commit f859098
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions github/github-accessors.go

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

10 changes: 10 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.

3 changes: 2 additions & 1 deletion github/github-stringify_test.go

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

3 changes: 3 additions & 0 deletions github/repos.go
Expand Up @@ -63,6 +63,7 @@ type Repository struct {
Organization *Organization `json:"organization,omitempty"`
Permissions map[string]bool `json:"permissions,omitempty"`
AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"`
AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"`
AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"`
AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"`
AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"`
Expand Down Expand Up @@ -363,6 +364,7 @@ type createRepoRequest struct {
AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"`
AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"`
AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"`
AllowUpdateBranch *bool `json:"allow_update_branch,omitempty"`
AllowAutoMerge *bool `json:"allow_auto_merge,omitempty"`
AllowForking *bool `json:"allow_forking,omitempty"`
DeleteBranchOnMerge *bool `json:"delete_branch_on_merge,omitempty"`
Expand Down Expand Up @@ -407,6 +409,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo
AllowSquashMerge: repo.AllowSquashMerge,
AllowMergeCommit: repo.AllowMergeCommit,
AllowRebaseMerge: repo.AllowRebaseMerge,
AllowUpdateBranch: repo.AllowUpdateBranch,
AllowAutoMerge: repo.AllowAutoMerge,
AllowForking: repo.AllowForking,
DeleteBranchOnMerge: repo.DeleteBranchOnMerge,
Expand Down

0 comments on commit f859098

Please sign in to comment.