Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ linters:
- TeamAddTeamRepoOptions
- TeamLDAPMapping
- TeamProjectOptions
- TemplateRepoRequest
- UpdateCodespaceOptions
- UpdateDefaultSetupConfigurationOptions
- UpdateProjectItemOptions
Expand Down
6 changes: 3 additions & 3 deletions github/github-accessors.go

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

5 changes: 1 addition & 4 deletions github/github-accessors_test.go

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

4 changes: 2 additions & 2 deletions github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo
// TemplateRepoRequest represents a request to create a repository from a template.
type TemplateRepoRequest struct {
// Name is required when creating a repo.
Name *string `json:"name,omitempty"`
Name string `json:"name"`
Owner *string `json:"owner,omitempty"`
Description *string `json:"description,omitempty"`

Expand All @@ -634,7 +634,7 @@ type TemplateRepoRequest struct {
// GitHub API docs: https://docs.github.com/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-using-a-template
//
//meta:operation POST /repos/{template_owner}/{template_repo}/generate
func (s *RepositoriesService) CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, body *TemplateRepoRequest) (*Repository, *Response, error) {
func (s *RepositoriesService) CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, body TemplateRepoRequest) (*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/generate", templateOwner, templateRepo)

req, err := s.client.NewRequest(ctx, "POST", u, body)
Expand Down
4 changes: 2 additions & 2 deletions github/repos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ func TestRepositoriesService_CreateFromTemplate(t *testing.T) {
t.Parallel()
client, mux, _ := setup(t)

templateRepoReq := &TemplateRepoRequest{
Name: Ptr("n"),
templateRepoReq := TemplateRepoRequest{
Name: "n",
}

mux.HandleFunc("/repos/to/tr/generate", func(w http.ResponseWriter, r *http.Request) {
Expand Down
Loading