Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request integrations#92 from sethvargo/sethvargo/projects
Browse files Browse the repository at this point in the history
Add has_projects field
  • Loading branch information
paultyng authored May 11, 2018
2 parents 5301766 + 4ace080 commit ca9732c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 12 additions & 6 deletions github/resource_github_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ func resourceGithubRepository() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"has_projects": {
Type: schema.TypeBool,
Optional: true,
},
"has_downloads": {
Type: schema.TypeBool,
Optional: true,
},
"has_wiki": {
Type: schema.TypeBool,
Optional: true,
Expand All @@ -61,10 +69,6 @@ func resourceGithubRepository() *schema.Resource {
Optional: true,
Default: true,
},
"has_downloads": {
Type: schema.TypeBool,
Optional: true,
},
"auto_init": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -122,12 +126,13 @@ func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository {
description := d.Get("description").(string)
homepageUrl := d.Get("homepage_url").(string)
private := d.Get("private").(bool)
hasDownloads := d.Get("has_downloads").(bool)
hasIssues := d.Get("has_issues").(bool)
hasProjects := d.Get("has_projects").(bool)
hasWiki := d.Get("has_wiki").(bool)
allowMergeCommit := d.Get("allow_merge_commit").(bool)
allowSquashMerge := d.Get("allow_squash_merge").(bool)
allowRebaseMerge := d.Get("allow_rebase_merge").(bool)
hasDownloads := d.Get("has_downloads").(bool)
autoInit := d.Get("auto_init").(bool)
licenseTemplate := d.Get("license_template").(string)
gitIgnoreTemplate := d.Get("gitignore_template").(string)
Expand All @@ -138,12 +143,13 @@ func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository {
Description: &description,
Homepage: &homepageUrl,
Private: &private,
HasDownloads: &hasDownloads,
HasIssues: &hasIssues,
HasProjects: &hasProjects,
HasWiki: &hasWiki,
AllowMergeCommit: &allowMergeCommit,
AllowSquashMerge: &allowSquashMerge,
AllowRebaseMerge: &allowRebaseMerge,
HasDownloads: &hasDownloads,
AutoInit: &autoInit,
LicenseTemplate: &licenseTemplate,
GitignoreTemplate: &gitIgnoreTemplate,
Expand Down
5 changes: 4 additions & 1 deletion github/resource_github_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func TestAccGithubRepository_basic(t *testing.T) {
AllowSquashMerge: false,
AllowRebaseMerge: false,
HasDownloads: true,
HasProjects: false,
DefaultBranch: "master",
Archived: false,
}),
Expand All @@ -90,6 +91,7 @@ func TestAccGithubRepository_basic(t *testing.T) {
AllowSquashMerge: true,
AllowRebaseMerge: true,
DefaultBranch: "master",
HasProjects: false,
Archived: false,
}),
),
Expand Down Expand Up @@ -328,12 +330,13 @@ type testAccGithubRepositoryExpectedAttributes struct {
Description string
Homepage string
Private bool
HasDownloads bool
HasIssues bool
HasProjects bool
HasWiki bool
AllowMergeCommit bool
AllowSquashMerge bool
AllowRebaseMerge bool
HasDownloads bool
AutoInit bool
DefaultBranch string
LicenseTemplate string
Expand Down

0 comments on commit ca9732c

Please sign in to comment.