ProjectPushRulesArgs

data class ProjectPushRulesArgs(val authorEmailRegex: Output<String>? = null, val branchNameRegex: Output<String>? = null, val commitCommitterCheck: Output<Boolean>? = null, val commitCommitterNameCheck: Output<Boolean>? = null, val commitMessageNegativeRegex: Output<String>? = null, val commitMessageRegex: Output<String>? = null, val denyDeleteTag: Output<Boolean>? = null, val fileNameRegex: Output<String>? = null, val maxFileSize: Output<Int>? = null, val memberCheck: Output<Boolean>? = null, val preventSecrets: Output<Boolean>? = null, val project: Output<String>? = null, val rejectNonDcoCommits: Output<Boolean>? = null, val rejectUnsignedCommits: Output<Boolean>? = null) : ConvertibleToJava<ProjectPushRulesArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const sample = new gitlab.ProjectPushRules("sample", {
project: "42",
authorEmailRegex: "@gitlab.com$",
branchNameRegex: "(feat|fix)\\/*",
commitCommitterCheck: true,
commitCommitterNameCheck: true,
commitMessageNegativeRegex: "ssh\\:\\/\\/",
commitMessageRegex: "(feat|fix):.*",
denyDeleteTag: false,
fileNameRegex: "(jar|exe)$",
maxFileSize: 4,
memberCheck: true,
preventSecrets: true,
rejectUnsignedCommits: false,
});
import pulumi
import pulumi_gitlab as gitlab
sample = gitlab.ProjectPushRules("sample",
project="42",
author_email_regex="@gitlab.com$",
branch_name_regex="(feat|fix)\\/*",
commit_committer_check=True,
commit_committer_name_check=True,
commit_message_negative_regex="ssh\\:\\/\\/",
commit_message_regex="(feat|fix):.*",
deny_delete_tag=False,
file_name_regex="(jar|exe)$",
max_file_size=4,
member_check=True,
prevent_secrets=True,
reject_unsigned_commits=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var sample = new GitLab.ProjectPushRules("sample", new()
{
Project = "42",
AuthorEmailRegex = "@gitlab.com$",
BranchNameRegex = "(feat|fix)\\/*",
CommitCommitterCheck = true,
CommitCommitterNameCheck = true,
CommitMessageNegativeRegex = "ssh\\:\\/\\/",
CommitMessageRegex = "(feat|fix):.*",
DenyDeleteTag = false,
FileNameRegex = "(jar|exe)$",
MaxFileSize = 4,
MemberCheck = true,
PreventSecrets = true,
RejectUnsignedCommits = false,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewProjectPushRules(ctx, "sample", &gitlab.ProjectPushRulesArgs{
Project: pulumi.String("42"),
AuthorEmailRegex: pulumi.String("@gitlab.com$"),
BranchNameRegex: pulumi.String("(feat|fix)\\/*"),
CommitCommitterCheck: pulumi.Bool(true),
CommitCommitterNameCheck: pulumi.Bool(true),
CommitMessageNegativeRegex: pulumi.String("ssh\\:\\/\\/"),
CommitMessageRegex: pulumi.String("(feat|fix):.*"),
DenyDeleteTag: pulumi.Bool(false),
FileNameRegex: pulumi.String("(jar|exe)$"),
MaxFileSize: pulumi.Int(4),
MemberCheck: pulumi.Bool(true),
PreventSecrets: pulumi.Bool(true),
RejectUnsignedCommits: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectPushRules;
import com.pulumi.gitlab.ProjectPushRulesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var sample = new ProjectPushRules("sample", ProjectPushRulesArgs.builder()
.project(42)
.authorEmailRegex("@gitlab.com$")
.branchNameRegex("(feat|fix)\\/*")
.commitCommitterCheck(true)
.commitCommitterNameCheck(true)
.commitMessageNegativeRegex("ssh\\:\\/\\/")
.commitMessageRegex("(feat|fix):.*")
.denyDeleteTag(false)
.fileNameRegex("(jar|exe)$")
.maxFileSize(4)
.memberCheck(true)
.preventSecrets(true)
.rejectUnsignedCommits(false)
.build());
}
}
resources:
sample:
type: gitlab:ProjectPushRules
properties:
project: 42
authorEmailRegex: '@gitlab.com$'
branchNameRegex: (feat|fix)\/*
commitCommitterCheck: true
commitCommitterNameCheck: true
commitMessageNegativeRegex: ssh\:\/\/
commitMessageRegex: (feat|fix):.*
denyDeleteTag: false
fileNameRegex: (jar|exe)$
maxFileSize: 4
memberCheck: true
preventSecrets: true
rejectUnsignedCommits: false

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_project_push_rules. For example: terraform import { to = gitlab_project_push_rules.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: Gitlab project push rules can be imported with a key composed of <project_id>, e.g.

$ pulumi import gitlab:index/projectPushRules:ProjectPushRules sample "42"

Constructors

Link copied to clipboard
constructor(authorEmailRegex: Output<String>? = null, branchNameRegex: Output<String>? = null, commitCommitterCheck: Output<Boolean>? = null, commitCommitterNameCheck: Output<Boolean>? = null, commitMessageNegativeRegex: Output<String>? = null, commitMessageRegex: Output<String>? = null, denyDeleteTag: Output<Boolean>? = null, fileNameRegex: Output<String>? = null, maxFileSize: Output<Int>? = null, memberCheck: Output<Boolean>? = null, preventSecrets: Output<Boolean>? = null, project: Output<String>? = null, rejectNonDcoCommits: Output<Boolean>? = null, rejectUnsignedCommits: Output<Boolean>? = null)

Properties

Link copied to clipboard
val authorEmailRegex: Output<String>? = null

All commit author emails must match this regex, e.g. @my-company.com$.

Link copied to clipboard
val branchNameRegex: Output<String>? = null

All branch names must match this regex, e.g. (feature|hotfix)\/*.

Link copied to clipboard
val commitCommitterCheck: Output<Boolean>? = null

Users can only push commits to this repository that were committed with one of their own verified emails.

Link copied to clipboard
val commitCommitterNameCheck: Output<Boolean>? = null

Users can only push commits to this repository if the commit author name is consistent with their GitLab account name.

Link copied to clipboard
val commitMessageNegativeRegex: Output<String>? = null

No commit message is allowed to match this regex, e.g. ssh\:\/\/.

Link copied to clipboard
val commitMessageRegex: Output<String>? = null

All commit messages must match this regex, e.g. Fixed \d+\..*.

Link copied to clipboard
val denyDeleteTag: Output<Boolean>? = null

Deny deleting a tag.

Link copied to clipboard
val fileNameRegex: Output<String>? = null

All committed filenames must not match this regex, e.g. (jar|exe)$.

Link copied to clipboard
val maxFileSize: Output<Int>? = null

Maximum file size (MB).

Link copied to clipboard
val memberCheck: Output<Boolean>? = null

Restrict commits by author (email) to existing GitLab users.

Link copied to clipboard
val preventSecrets: Output<Boolean>? = null

GitLab will reject any files that are likely to contain secrets.

Link copied to clipboard
val project: Output<String>? = null

The ID or URL-encoded path of the project.

Link copied to clipboard
val rejectNonDcoCommits: Output<Boolean>? = null

Reject commit when it’s not DCO certified.

Link copied to clipboard
val rejectUnsignedCommits: Output<Boolean>? = null

Reject commit when it’s not signed. //////*/

Functions

Link copied to clipboard
open override fun toJava(): ProjectPushRulesArgs