From c54ee078f2ed8abd50def1e6e8fc729de8cbf2d6 Mon Sep 17 00:00:00 2001 From: Jose De La Rosa Date: Tue, 14 Jan 2020 10:46:06 -0600 Subject: [PATCH] Add support for commit_committer_check and reject_unsigned_commits in push rules resource --- gitlab/resource_gitlab_project_push_rules.go | 10 ++++++++++ website/docs/r/project_push_rules.html.markdown | 2 ++ 2 files changed, 12 insertions(+) diff --git a/gitlab/resource_gitlab_project_push_rules.go b/gitlab/resource_gitlab_project_push_rules.go index 1902a0247..0f193143f 100644 --- a/gitlab/resource_gitlab_project_push_rules.go +++ b/gitlab/resource_gitlab_project_push_rules.go @@ -57,6 +57,14 @@ func resourceGitlabProjectPushRules() *schema.Resource { Type: schema.TypeInt, Optional: true, }, + "commit_committer_check": { + Type: schema.TypeBool, + Optional: true, + }, + "reject_unsigned_commits": { + Type: schema.TypeBool, + Optional: true, + }, }, } } @@ -120,6 +128,8 @@ func resourceGitlabProjectPushRulesRead(d *schema.ResourceData, meta interface{} d.Set("member_check", pushRules.MemberCheck) d.Set("prevent_secrets", pushRules.PreventSecrets) d.Set("max_file_size", pushRules.MaxFileSize) + d.Set("commit_committer_check", pushRules.CommitCommitterCheck) + d.Set("reject_unsigned_commits", pushRules.RejectUnsignedCommits) return nil } diff --git a/website/docs/r/project_push_rules.html.markdown b/website/docs/r/project_push_rules.html.markdown index b3ae3d91c..242508113 100644 --- a/website/docs/r/project_push_rules.html.markdown +++ b/website/docs/r/project_push_rules.html.markdown @@ -48,6 +48,8 @@ The following arguments are supported: * `commit_committer_check` - (Optional, bool) Users can only push commits to this repository that were committed with one of their own verified emails +* `reject_unsigned_commits` - (Optional, bool) Reject commit when it is not signed through GPG. + ## Attributes Reference The resource exports the following attributes: