From 2ff5ce6f18b0d0700fe8e49a82b526e48e3387d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paco=20Guzm=C3=A1n?= Date: Wed, 1 Jun 2022 13:27:14 +0200 Subject: [PATCH] Allow repositories to set up update branch suggestion --- github/resource_github_repository.go | 6 ++++++ website/docs/d/repository.html.markdown | 2 ++ 2 files changed, 8 insertions(+) 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.