Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow repositories to set up update branch suggestion #1170

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions github/resource_github_repository.go
Expand Up @@ -94,6 +94,11 @@ func resourceGithubRepository() *schema.Resource {
Optional: true,
Default: false,
},
"allow_update_branch": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"delete_branch_on_merge": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -295,6 +300,7 @@ func resourceGithubRepositoryObject(d *schema.ResourceData) *github.Repository {
AllowSquashMerge: github.Bool(d.Get("allow_squash_merge").(bool)),
AllowRebaseMerge: github.Bool(d.Get("allow_rebase_merge").(bool)),
AllowAutoMerge: github.Bool(d.Get("allow_auto_merge").(bool)),
AllowUpdateBranch: github.Bool(d.Get("allow_update_branch").(bool)),
DeleteBranchOnMerge: github.Bool(d.Get("delete_branch_on_merge").(bool)),
AutoInit: github.Bool(d.Get("auto_init").(bool)),
LicenseTemplate: github.String(d.Get("license_template").(string)),
Expand Down
2 changes: 2 additions & 0 deletions website/docs/d/repository.html.markdown
Expand Up @@ -51,6 +51,8 @@ The following arguments are supported:

* `allow_auto_merge` - Whether the repository allows auto-merging pull requests.

* `allow_update_branch` - Whether the repository allows users to be prompted to update their branches if there are new changes available in the base branch..

* `has_downloads` - Whether the repository has Downloads feature enabled.

* `default_branch` - The name of the default branch of the repository.
Expand Down