Skip to content

Commit

Permalink
repos: add option include_all_branches to template repo request
Browse files Browse the repository at this point in the history
This option, when set to true, the created repository will get files
from all the branches, not just the default branch.

See [create-a-repository-using-a-template][1] for more information.

[1]: https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template
  • Loading branch information
zhouhaibing089 committed Jun 7, 2021
1 parent 8751f3d commit f72fa87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ type TemplateRepoRequest struct {
Owner *string `json:"owner,omitempty"`
Description *string `json:"description,omitempty"`

Private *bool `json:"private,omitempty"`
IncludeAllBranches *bool `json:"include_all_branches,omitempty"`
Private *bool `json:"private,omitempty"`
}

// CreateFromTemplate generates a repository from a template.
Expand Down

0 comments on commit f72fa87

Please sign in to comment.