Skip to content

Commit

Permalink
Add has_discussions field to repository
Browse files Browse the repository at this point in the history
  • Loading branch information
gronsy committed Dec 4, 2022
1 parent 0621dee commit 02036ad
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
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.

15 changes: 9 additions & 6 deletions github/repos.go
Expand Up @@ -88,6 +88,7 @@ type Repository struct {
HasPages *bool `json:"has_pages,omitempty"`
HasProjects *bool `json:"has_projects,omitempty"`
HasDownloads *bool `json:"has_downloads,omitempty"`
HasDiscussions *bool `json:"has_discussions,omitempty"`
IsTemplate *bool `json:"is_template,omitempty"`
LicenseTemplate *string `json:"license_template,omitempty"`
GitignoreTemplate *string `json:"gitignore_template,omitempty"`
Expand Down Expand Up @@ -365,12 +366,13 @@ type createRepoRequest struct {
Description *string `json:"description,omitempty"`
Homepage *string `json:"homepage,omitempty"`

Private *bool `json:"private,omitempty"`
Visibility *string `json:"visibility,omitempty"`
HasIssues *bool `json:"has_issues,omitempty"`
HasProjects *bool `json:"has_projects,omitempty"`
HasWiki *bool `json:"has_wiki,omitempty"`
IsTemplate *bool `json:"is_template,omitempty"`
Private *bool `json:"private,omitempty"`
Visibility *string `json:"visibility,omitempty"`
HasIssues *bool `json:"has_issues,omitempty"`
HasProjects *bool `json:"has_projects,omitempty"`
HasWiki *bool `json:"has_wiki,omitempty"`
HasDiscussions *bool `json:"has_discussions,omitempty"`
IsTemplate *bool `json:"is_template,omitempty"`

// Creating an organization repository. Required for non-owners.
TeamID *int64 `json:"team_id,omitempty"`
Expand Down Expand Up @@ -423,6 +425,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo
HasIssues: repo.HasIssues,
HasProjects: repo.HasProjects,
HasWiki: repo.HasWiki,
HasDiscussions: repo.HasDiscussions,
IsTemplate: repo.IsTemplate,
TeamID: repo.TeamID,
AutoInit: repo.AutoInit,
Expand Down

0 comments on commit 02036ad

Please sign in to comment.