diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 57baa7604e..85031b8455 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -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, @@ -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)), diff --git a/website/docs/d/repository.html.markdown b/website/docs/d/repository.html.markdown index 59f934bffc..75507d27d2 100644 --- a/website/docs/d/repository.html.markdown +++ b/website/docs/d/repository.html.markdown @@ -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.