1. Packages
  2. Github Provider
  3. API Docs
  4. RepositoryRuleset
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.RepositoryRuleset

Explore with Pulumi AI

Creates a GitHub repository ruleset.

This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const example = new github.Repository("example", {
    name: "example",
    description: "Example repository",
});
const exampleRepositoryRuleset = new github.RepositoryRuleset("example", {
    name: "example",
    repository: example.name,
    target: "branch",
    enforcement: "active",
    conditions: {
        refName: {
            includes: ["~ALL"],
            excludes: [],
        },
    },
    bypassActors: [{
        actorId: 13473,
        actorType: "Integration",
        bypassMode: "always",
    }],
    rules: {
        creation: true,
        update: true,
        deletion: true,
        requiredLinearHistory: true,
        requiredSignatures: true,
        requiredDeployments: {
            requiredDeploymentEnvironments: ["test"],
        },
    },
});
Copy
import pulumi
import pulumi_github as github

example = github.Repository("example",
    name="example",
    description="Example repository")
example_repository_ruleset = github.RepositoryRuleset("example",
    name="example",
    repository=example.name,
    target="branch",
    enforcement="active",
    conditions={
        "ref_name": {
            "includes": ["~ALL"],
            "excludes": [],
        },
    },
    bypass_actors=[{
        "actor_id": 13473,
        "actor_type": "Integration",
        "bypass_mode": "always",
    }],
    rules={
        "creation": True,
        "update": True,
        "deletion": True,
        "required_linear_history": True,
        "required_signatures": True,
        "required_deployments": {
            "required_deployment_environments": ["test"],
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
			Name:        pulumi.String("example"),
			Description: pulumi.String("Example repository"),
		})
		if err != nil {
			return err
		}
		_, err = github.NewRepositoryRuleset(ctx, "example", &github.RepositoryRulesetArgs{
			Name:        pulumi.String("example"),
			Repository:  example.Name,
			Target:      pulumi.String("branch"),
			Enforcement: pulumi.String("active"),
			Conditions: &github.RepositoryRulesetConditionsArgs{
				RefName: &github.RepositoryRulesetConditionsRefNameArgs{
					Includes: pulumi.StringArray{
						pulumi.String("~ALL"),
					},
					Excludes: pulumi.StringArray{},
				},
			},
			BypassActors: github.RepositoryRulesetBypassActorArray{
				&github.RepositoryRulesetBypassActorArgs{
					ActorId:    pulumi.Int(13473),
					ActorType:  pulumi.String("Integration"),
					BypassMode: pulumi.String("always"),
				},
			},
			Rules: &github.RepositoryRulesetRulesArgs{
				Creation:              pulumi.Bool(true),
				Update:                pulumi.Bool(true),
				Deletion:              pulumi.Bool(true),
				RequiredLinearHistory: pulumi.Bool(true),
				RequiredSignatures:    pulumi.Bool(true),
				RequiredDeployments: &github.RepositoryRulesetRulesRequiredDeploymentsArgs{
					RequiredDeploymentEnvironments: pulumi.StringArray{
						pulumi.String("test"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var example = new Github.Repository("example", new()
    {
        Name = "example",
        Description = "Example repository",
    });

    var exampleRepositoryRuleset = new Github.RepositoryRuleset("example", new()
    {
        Name = "example",
        Repository = example.Name,
        Target = "branch",
        Enforcement = "active",
        Conditions = new Github.Inputs.RepositoryRulesetConditionsArgs
        {
            RefName = new Github.Inputs.RepositoryRulesetConditionsRefNameArgs
            {
                Includes = new[]
                {
                    "~ALL",
                },
                Excludes = new() { },
            },
        },
        BypassActors = new[]
        {
            new Github.Inputs.RepositoryRulesetBypassActorArgs
            {
                ActorId = 13473,
                ActorType = "Integration",
                BypassMode = "always",
            },
        },
        Rules = new Github.Inputs.RepositoryRulesetRulesArgs
        {
            Creation = true,
            Update = true,
            Deletion = true,
            RequiredLinearHistory = true,
            RequiredSignatures = true,
            RequiredDeployments = new Github.Inputs.RepositoryRulesetRulesRequiredDeploymentsArgs
            {
                RequiredDeploymentEnvironments = new[]
                {
                    "test",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.RepositoryRuleset;
import com.pulumi.github.RepositoryRulesetArgs;
import com.pulumi.github.inputs.RepositoryRulesetConditionsArgs;
import com.pulumi.github.inputs.RepositoryRulesetConditionsRefNameArgs;
import com.pulumi.github.inputs.RepositoryRulesetBypassActorArgs;
import com.pulumi.github.inputs.RepositoryRulesetRulesArgs;
import com.pulumi.github.inputs.RepositoryRulesetRulesRequiredDeploymentsArgs;
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 example = new Repository("example", RepositoryArgs.builder()
            .name("example")
            .description("Example repository")
            .build());

        var exampleRepositoryRuleset = new RepositoryRuleset("exampleRepositoryRuleset", RepositoryRulesetArgs.builder()
            .name("example")
            .repository(example.name())
            .target("branch")
            .enforcement("active")
            .conditions(RepositoryRulesetConditionsArgs.builder()
                .refName(RepositoryRulesetConditionsRefNameArgs.builder()
                    .includes("~ALL")
                    .excludes()
                    .build())
                .build())
            .bypassActors(RepositoryRulesetBypassActorArgs.builder()
                .actorId(13473)
                .actorType("Integration")
                .bypassMode("always")
                .build())
            .rules(RepositoryRulesetRulesArgs.builder()
                .creation(true)
                .update(true)
                .deletion(true)
                .requiredLinearHistory(true)
                .requiredSignatures(true)
                .requiredDeployments(RepositoryRulesetRulesRequiredDeploymentsArgs.builder()
                    .requiredDeploymentEnvironments("test")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: github:Repository
    properties:
      name: example
      description: Example repository
  exampleRepositoryRuleset:
    type: github:RepositoryRuleset
    name: example
    properties:
      name: example
      repository: ${example.name}
      target: branch
      enforcement: active
      conditions:
        refName:
          includes:
            - ~ALL
          excludes: []
      bypassActors:
        - actorId: 13473
          actorType: Integration
          bypassMode: always
      rules:
        creation: true
        update: true
        deletion: true
        requiredLinearHistory: true
        requiredSignatures: true
        requiredDeployments:
          requiredDeploymentEnvironments:
            - test
Copy

Create RepositoryRuleset Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RepositoryRuleset(name: string, args: RepositoryRulesetArgs, opts?: CustomResourceOptions);
@overload
def RepositoryRuleset(resource_name: str,
                      args: RepositoryRulesetArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def RepositoryRuleset(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      enforcement: Optional[str] = None,
                      rules: Optional[RepositoryRulesetRulesArgs] = None,
                      target: Optional[str] = None,
                      bypass_actors: Optional[Sequence[RepositoryRulesetBypassActorArgs]] = None,
                      conditions: Optional[RepositoryRulesetConditionsArgs] = None,
                      name: Optional[str] = None,
                      repository: Optional[str] = None)
func NewRepositoryRuleset(ctx *Context, name string, args RepositoryRulesetArgs, opts ...ResourceOption) (*RepositoryRuleset, error)
public RepositoryRuleset(string name, RepositoryRulesetArgs args, CustomResourceOptions? opts = null)
public RepositoryRuleset(String name, RepositoryRulesetArgs args)
public RepositoryRuleset(String name, RepositoryRulesetArgs args, CustomResourceOptions options)
type: github:RepositoryRuleset
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RepositoryRulesetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RepositoryRulesetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryRulesetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryRulesetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RepositoryRulesetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var repositoryRulesetResource = new Github.RepositoryRuleset("repositoryRulesetResource", new()
{
    Enforcement = "string",
    Rules = new Github.Inputs.RepositoryRulesetRulesArgs
    {
        BranchNamePattern = new Github.Inputs.RepositoryRulesetRulesBranchNamePatternArgs
        {
            Operator = "string",
            Pattern = "string",
            Name = "string",
            Negate = false,
        },
        CommitAuthorEmailPattern = new Github.Inputs.RepositoryRulesetRulesCommitAuthorEmailPatternArgs
        {
            Operator = "string",
            Pattern = "string",
            Name = "string",
            Negate = false,
        },
        CommitMessagePattern = new Github.Inputs.RepositoryRulesetRulesCommitMessagePatternArgs
        {
            Operator = "string",
            Pattern = "string",
            Name = "string",
            Negate = false,
        },
        CommitterEmailPattern = new Github.Inputs.RepositoryRulesetRulesCommitterEmailPatternArgs
        {
            Operator = "string",
            Pattern = "string",
            Name = "string",
            Negate = false,
        },
        Creation = false,
        Deletion = false,
        MergeQueue = new Github.Inputs.RepositoryRulesetRulesMergeQueueArgs
        {
            CheckResponseTimeoutMinutes = 0,
            GroupingStrategy = "string",
            MaxEntriesToBuild = 0,
            MaxEntriesToMerge = 0,
            MergeMethod = "string",
            MinEntriesToMerge = 0,
            MinEntriesToMergeWaitMinutes = 0,
        },
        NonFastForward = false,
        PullRequest = new Github.Inputs.RepositoryRulesetRulesPullRequestArgs
        {
            DismissStaleReviewsOnPush = false,
            RequireCodeOwnerReview = false,
            RequireLastPushApproval = false,
            RequiredApprovingReviewCount = 0,
            RequiredReviewThreadResolution = false,
        },
        RequiredCodeScanning = new Github.Inputs.RepositoryRulesetRulesRequiredCodeScanningArgs
        {
            RequiredCodeScanningTools = new[]
            {
                new Github.Inputs.RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningToolArgs
                {
                    AlertsThreshold = "string",
                    SecurityAlertsThreshold = "string",
                    Tool = "string",
                },
            },
        },
        RequiredDeployments = new Github.Inputs.RepositoryRulesetRulesRequiredDeploymentsArgs
        {
            RequiredDeploymentEnvironments = new[]
            {
                "string",
            },
        },
        RequiredLinearHistory = false,
        RequiredSignatures = false,
        RequiredStatusChecks = new Github.Inputs.RepositoryRulesetRulesRequiredStatusChecksArgs
        {
            RequiredChecks = new[]
            {
                new Github.Inputs.RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs
                {
                    Context = "string",
                    IntegrationId = 0,
                },
            },
            DoNotEnforceOnCreate = false,
            StrictRequiredStatusChecksPolicy = false,
        },
        TagNamePattern = new Github.Inputs.RepositoryRulesetRulesTagNamePatternArgs
        {
            Operator = "string",
            Pattern = "string",
            Name = "string",
            Negate = false,
        },
        Update = false,
        UpdateAllowsFetchAndMerge = false,
    },
    Target = "string",
    BypassActors = new[]
    {
        new Github.Inputs.RepositoryRulesetBypassActorArgs
        {
            ActorId = 0,
            ActorType = "string",
            BypassMode = "string",
        },
    },
    Conditions = new Github.Inputs.RepositoryRulesetConditionsArgs
    {
        RefName = new Github.Inputs.RepositoryRulesetConditionsRefNameArgs
        {
            Excludes = new[]
            {
                "string",
            },
            Includes = new[]
            {
                "string",
            },
        },
    },
    Name = "string",
    Repository = "string",
});
Copy
example, err := github.NewRepositoryRuleset(ctx, "repositoryRulesetResource", &github.RepositoryRulesetArgs{
	Enforcement: pulumi.String("string"),
	Rules: &github.RepositoryRulesetRulesArgs{
		BranchNamePattern: &github.RepositoryRulesetRulesBranchNamePatternArgs{
			Operator: pulumi.String("string"),
			Pattern:  pulumi.String("string"),
			Name:     pulumi.String("string"),
			Negate:   pulumi.Bool(false),
		},
		CommitAuthorEmailPattern: &github.RepositoryRulesetRulesCommitAuthorEmailPatternArgs{
			Operator: pulumi.String("string"),
			Pattern:  pulumi.String("string"),
			Name:     pulumi.String("string"),
			Negate:   pulumi.Bool(false),
		},
		CommitMessagePattern: &github.RepositoryRulesetRulesCommitMessagePatternArgs{
			Operator: pulumi.String("string"),
			Pattern:  pulumi.String("string"),
			Name:     pulumi.String("string"),
			Negate:   pulumi.Bool(false),
		},
		CommitterEmailPattern: &github.RepositoryRulesetRulesCommitterEmailPatternArgs{
			Operator: pulumi.String("string"),
			Pattern:  pulumi.String("string"),
			Name:     pulumi.String("string"),
			Negate:   pulumi.Bool(false),
		},
		Creation: pulumi.Bool(false),
		Deletion: pulumi.Bool(false),
		MergeQueue: &github.RepositoryRulesetRulesMergeQueueArgs{
			CheckResponseTimeoutMinutes:  pulumi.Int(0),
			GroupingStrategy:             pulumi.String("string"),
			MaxEntriesToBuild:            pulumi.Int(0),
			MaxEntriesToMerge:            pulumi.Int(0),
			MergeMethod:                  pulumi.String("string"),
			MinEntriesToMerge:            pulumi.Int(0),
			MinEntriesToMergeWaitMinutes: pulumi.Int(0),
		},
		NonFastForward: pulumi.Bool(false),
		PullRequest: &github.RepositoryRulesetRulesPullRequestArgs{
			DismissStaleReviewsOnPush:      pulumi.Bool(false),
			RequireCodeOwnerReview:         pulumi.Bool(false),
			RequireLastPushApproval:        pulumi.Bool(false),
			RequiredApprovingReviewCount:   pulumi.Int(0),
			RequiredReviewThreadResolution: pulumi.Bool(false),
		},
		RequiredCodeScanning: &github.RepositoryRulesetRulesRequiredCodeScanningArgs{
			RequiredCodeScanningTools: github.RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningToolArray{
				&github.RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningToolArgs{
					AlertsThreshold:         pulumi.String("string"),
					SecurityAlertsThreshold: pulumi.String("string"),
					Tool:                    pulumi.String("string"),
				},
			},
		},
		RequiredDeployments: &github.RepositoryRulesetRulesRequiredDeploymentsArgs{
			RequiredDeploymentEnvironments: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
		RequiredLinearHistory: pulumi.Bool(false),
		RequiredSignatures:    pulumi.Bool(false),
		RequiredStatusChecks: &github.RepositoryRulesetRulesRequiredStatusChecksArgs{
			RequiredChecks: github.RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArray{
				&github.RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs{
					Context:       pulumi.String("string"),
					IntegrationId: pulumi.Int(0),
				},
			},
			DoNotEnforceOnCreate:             pulumi.Bool(false),
			StrictRequiredStatusChecksPolicy: pulumi.Bool(false),
		},
		TagNamePattern: &github.RepositoryRulesetRulesTagNamePatternArgs{
			Operator: pulumi.String("string"),
			Pattern:  pulumi.String("string"),
			Name:     pulumi.String("string"),
			Negate:   pulumi.Bool(false),
		},
		Update:                    pulumi.Bool(false),
		UpdateAllowsFetchAndMerge: pulumi.Bool(false),
	},
	Target: pulumi.String("string"),
	BypassActors: github.RepositoryRulesetBypassActorArray{
		&github.RepositoryRulesetBypassActorArgs{
			ActorId:    pulumi.Int(0),
			ActorType:  pulumi.String("string"),
			BypassMode: pulumi.String("string"),
		},
	},
	Conditions: &github.RepositoryRulesetConditionsArgs{
		RefName: &github.RepositoryRulesetConditionsRefNameArgs{
			Excludes: pulumi.StringArray{
				pulumi.String("string"),
			},
			Includes: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	Name:       pulumi.String("string"),
	Repository: pulumi.String("string"),
})
Copy
var repositoryRulesetResource = new RepositoryRuleset("repositoryRulesetResource", RepositoryRulesetArgs.builder()
    .enforcement("string")
    .rules(RepositoryRulesetRulesArgs.builder()
        .branchNamePattern(RepositoryRulesetRulesBranchNamePatternArgs.builder()
            .operator("string")
            .pattern("string")
            .name("string")
            .negate(false)
            .build())
        .commitAuthorEmailPattern(RepositoryRulesetRulesCommitAuthorEmailPatternArgs.builder()
            .operator("string")
            .pattern("string")
            .name("string")
            .negate(false)
            .build())
        .commitMessagePattern(RepositoryRulesetRulesCommitMessagePatternArgs.builder()
            .operator("string")
            .pattern("string")
            .name("string")
            .negate(false)
            .build())
        .committerEmailPattern(RepositoryRulesetRulesCommitterEmailPatternArgs.builder()
            .operator("string")
            .pattern("string")
            .name("string")
            .negate(false)
            .build())
        .creation(false)
        .deletion(false)
        .mergeQueue(RepositoryRulesetRulesMergeQueueArgs.builder()
            .checkResponseTimeoutMinutes(0)
            .groupingStrategy("string")
            .maxEntriesToBuild(0)
            .maxEntriesToMerge(0)
            .mergeMethod("string")
            .minEntriesToMerge(0)
            .minEntriesToMergeWaitMinutes(0)
            .build())
        .nonFastForward(false)
        .pullRequest(RepositoryRulesetRulesPullRequestArgs.builder()
            .dismissStaleReviewsOnPush(false)
            .requireCodeOwnerReview(false)
            .requireLastPushApproval(false)
            .requiredApprovingReviewCount(0)
            .requiredReviewThreadResolution(false)
            .build())
        .requiredCodeScanning(RepositoryRulesetRulesRequiredCodeScanningArgs.builder()
            .requiredCodeScanningTools(RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningToolArgs.builder()
                .alertsThreshold("string")
                .securityAlertsThreshold("string")
                .tool("string")
                .build())
            .build())
        .requiredDeployments(RepositoryRulesetRulesRequiredDeploymentsArgs.builder()
            .requiredDeploymentEnvironments("string")
            .build())
        .requiredLinearHistory(false)
        .requiredSignatures(false)
        .requiredStatusChecks(RepositoryRulesetRulesRequiredStatusChecksArgs.builder()
            .requiredChecks(RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs.builder()
                .context("string")
                .integrationId(0)
                .build())
            .doNotEnforceOnCreate(false)
            .strictRequiredStatusChecksPolicy(false)
            .build())
        .tagNamePattern(RepositoryRulesetRulesTagNamePatternArgs.builder()
            .operator("string")
            .pattern("string")
            .name("string")
            .negate(false)
            .build())
        .update(false)
        .updateAllowsFetchAndMerge(false)
        .build())
    .target("string")
    .bypassActors(RepositoryRulesetBypassActorArgs.builder()
        .actorId(0)
        .actorType("string")
        .bypassMode("string")
        .build())
    .conditions(RepositoryRulesetConditionsArgs.builder()
        .refName(RepositoryRulesetConditionsRefNameArgs.builder()
            .excludes("string")
            .includes("string")
            .build())
        .build())
    .name("string")
    .repository("string")
    .build());
Copy
repository_ruleset_resource = github.RepositoryRuleset("repositoryRulesetResource",
    enforcement="string",
    rules={
        "branch_name_pattern": {
            "operator": "string",
            "pattern": "string",
            "name": "string",
            "negate": False,
        },
        "commit_author_email_pattern": {
            "operator": "string",
            "pattern": "string",
            "name": "string",
            "negate": False,
        },
        "commit_message_pattern": {
            "operator": "string",
            "pattern": "string",
            "name": "string",
            "negate": False,
        },
        "committer_email_pattern": {
            "operator": "string",
            "pattern": "string",
            "name": "string",
            "negate": False,
        },
        "creation": False,
        "deletion": False,
        "merge_queue": {
            "check_response_timeout_minutes": 0,
            "grouping_strategy": "string",
            "max_entries_to_build": 0,
            "max_entries_to_merge": 0,
            "merge_method": "string",
            "min_entries_to_merge": 0,
            "min_entries_to_merge_wait_minutes": 0,
        },
        "non_fast_forward": False,
        "pull_request": {
            "dismiss_stale_reviews_on_push": False,
            "require_code_owner_review": False,
            "require_last_push_approval": False,
            "required_approving_review_count": 0,
            "required_review_thread_resolution": False,
        },
        "required_code_scanning": {
            "required_code_scanning_tools": [{
                "alerts_threshold": "string",
                "security_alerts_threshold": "string",
                "tool": "string",
            }],
        },
        "required_deployments": {
            "required_deployment_environments": ["string"],
        },
        "required_linear_history": False,
        "required_signatures": False,
        "required_status_checks": {
            "required_checks": [{
                "context": "string",
                "integration_id": 0,
            }],
            "do_not_enforce_on_create": False,
            "strict_required_status_checks_policy": False,
        },
        "tag_name_pattern": {
            "operator": "string",
            "pattern": "string",
            "name": "string",
            "negate": False,
        },
        "update": False,
        "update_allows_fetch_and_merge": False,
    },
    target="string",
    bypass_actors=[{
        "actor_id": 0,
        "actor_type": "string",
        "bypass_mode": "string",
    }],
    conditions={
        "ref_name": {
            "excludes": ["string"],
            "includes": ["string"],
        },
    },
    name="string",
    repository="string")
Copy
const repositoryRulesetResource = new github.RepositoryRuleset("repositoryRulesetResource", {
    enforcement: "string",
    rules: {
        branchNamePattern: {
            operator: "string",
            pattern: "string",
            name: "string",
            negate: false,
        },
        commitAuthorEmailPattern: {
            operator: "string",
            pattern: "string",
            name: "string",
            negate: false,
        },
        commitMessagePattern: {
            operator: "string",
            pattern: "string",
            name: "string",
            negate: false,
        },
        committerEmailPattern: {
            operator: "string",
            pattern: "string",
            name: "string",
            negate: false,
        },
        creation: false,
        deletion: false,
        mergeQueue: {
            checkResponseTimeoutMinutes: 0,
            groupingStrategy: "string",
            maxEntriesToBuild: 0,
            maxEntriesToMerge: 0,
            mergeMethod: "string",
            minEntriesToMerge: 0,
            minEntriesToMergeWaitMinutes: 0,
        },
        nonFastForward: false,
        pullRequest: {
            dismissStaleReviewsOnPush: false,
            requireCodeOwnerReview: false,
            requireLastPushApproval: false,
            requiredApprovingReviewCount: 0,
            requiredReviewThreadResolution: false,
        },
        requiredCodeScanning: {
            requiredCodeScanningTools: [{
                alertsThreshold: "string",
                securityAlertsThreshold: "string",
                tool: "string",
            }],
        },
        requiredDeployments: {
            requiredDeploymentEnvironments: ["string"],
        },
        requiredLinearHistory: false,
        requiredSignatures: false,
        requiredStatusChecks: {
            requiredChecks: [{
                context: "string",
                integrationId: 0,
            }],
            doNotEnforceOnCreate: false,
            strictRequiredStatusChecksPolicy: false,
        },
        tagNamePattern: {
            operator: "string",
            pattern: "string",
            name: "string",
            negate: false,
        },
        update: false,
        updateAllowsFetchAndMerge: false,
    },
    target: "string",
    bypassActors: [{
        actorId: 0,
        actorType: "string",
        bypassMode: "string",
    }],
    conditions: {
        refName: {
            excludes: ["string"],
            includes: ["string"],
        },
    },
    name: "string",
    repository: "string",
});
Copy
type: github:RepositoryRuleset
properties:
    bypassActors:
        - actorId: 0
          actorType: string
          bypassMode: string
    conditions:
        refName:
            excludes:
                - string
            includes:
                - string
    enforcement: string
    name: string
    repository: string
    rules:
        branchNamePattern:
            name: string
            negate: false
            operator: string
            pattern: string
        commitAuthorEmailPattern:
            name: string
            negate: false
            operator: string
            pattern: string
        commitMessagePattern:
            name: string
            negate: false
            operator: string
            pattern: string
        committerEmailPattern:
            name: string
            negate: false
            operator: string
            pattern: string
        creation: false
        deletion: false
        mergeQueue:
            checkResponseTimeoutMinutes: 0
            groupingStrategy: string
            maxEntriesToBuild: 0
            maxEntriesToMerge: 0
            mergeMethod: string
            minEntriesToMerge: 0
            minEntriesToMergeWaitMinutes: 0
        nonFastForward: false
        pullRequest:
            dismissStaleReviewsOnPush: false
            requireCodeOwnerReview: false
            requireLastPushApproval: false
            requiredApprovingReviewCount: 0
            requiredReviewThreadResolution: false
        requiredCodeScanning:
            requiredCodeScanningTools:
                - alertsThreshold: string
                  securityAlertsThreshold: string
                  tool: string
        requiredDeployments:
            requiredDeploymentEnvironments:
                - string
        requiredLinearHistory: false
        requiredSignatures: false
        requiredStatusChecks:
            doNotEnforceOnCreate: false
            requiredChecks:
                - context: string
                  integrationId: 0
            strictRequiredStatusChecksPolicy: false
        tagNamePattern:
            name: string
            negate: false
            operator: string
            pattern: string
        update: false
        updateAllowsFetchAndMerge: false
    target: string
Copy

RepositoryRuleset Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RepositoryRuleset resource accepts the following input properties:

Enforcement This property is required. string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
Rules This property is required. RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
Target This property is required. string
(String) Possible values are branch and tag.
BypassActors List<RepositoryRulesetBypassActor>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
Conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
Name string
(String) The name of the ruleset.
Repository string
(String) Name of the repository to apply rulset to.
Enforcement This property is required. string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
Rules This property is required. RepositoryRulesetRulesArgs
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
Target This property is required. string
(String) Possible values are branch and tag.
BypassActors []RepositoryRulesetBypassActorArgs
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
Conditions RepositoryRulesetConditionsArgs
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
Name string
(String) The name of the ruleset.
Repository string
(String) Name of the repository to apply rulset to.
enforcement This property is required. String
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
rules This property is required. RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
target This property is required. String
(String) Possible values are branch and tag.
bypassActors List<RepositoryRulesetBypassActor>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
name String
(String) The name of the ruleset.
repository String
(String) Name of the repository to apply rulset to.
enforcement This property is required. string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
rules This property is required. RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
target This property is required. string
(String) Possible values are branch and tag.
bypassActors RepositoryRulesetBypassActor[]
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
name string
(String) The name of the ruleset.
repository string
(String) Name of the repository to apply rulset to.
enforcement This property is required. str
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
rules This property is required. RepositoryRulesetRulesArgs
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
target This property is required. str
(String) Possible values are branch and tag.
bypass_actors Sequence[RepositoryRulesetBypassActorArgs]
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditionsArgs
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
name str
(String) The name of the ruleset.
repository str
(String) Name of the repository to apply rulset to.
enforcement This property is required. String
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
rules This property is required. Property Map
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
target This property is required. String
(String) Possible values are branch and tag.
bypassActors List<Property Map>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions Property Map
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
name String
(String) The name of the ruleset.
repository String
(String) Name of the repository to apply rulset to.

Outputs

All input properties are implicitly available as output properties. Additionally, the RepositoryRuleset resource produces the following output properties:

Etag string
(String)
Id string
The provider-assigned unique ID for this managed resource.
NodeId string
(String) GraphQL global node id for use with v4 API.
RulesetId int
(Number) GitHub ID for the ruleset.
Etag string
(String)
Id string
The provider-assigned unique ID for this managed resource.
NodeId string
(String) GraphQL global node id for use with v4 API.
RulesetId int
(Number) GitHub ID for the ruleset.
etag String
(String)
id String
The provider-assigned unique ID for this managed resource.
nodeId String
(String) GraphQL global node id for use with v4 API.
rulesetId Integer
(Number) GitHub ID for the ruleset.
etag string
(String)
id string
The provider-assigned unique ID for this managed resource.
nodeId string
(String) GraphQL global node id for use with v4 API.
rulesetId number
(Number) GitHub ID for the ruleset.
etag str
(String)
id str
The provider-assigned unique ID for this managed resource.
node_id str
(String) GraphQL global node id for use with v4 API.
ruleset_id int
(Number) GitHub ID for the ruleset.
etag String
(String)
id String
The provider-assigned unique ID for this managed resource.
nodeId String
(String) GraphQL global node id for use with v4 API.
rulesetId Number
(Number) GitHub ID for the ruleset.

Look up Existing RepositoryRuleset Resource

Get an existing RepositoryRuleset resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RepositoryRulesetState, opts?: CustomResourceOptions): RepositoryRuleset
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        bypass_actors: Optional[Sequence[RepositoryRulesetBypassActorArgs]] = None,
        conditions: Optional[RepositoryRulesetConditionsArgs] = None,
        enforcement: Optional[str] = None,
        etag: Optional[str] = None,
        name: Optional[str] = None,
        node_id: Optional[str] = None,
        repository: Optional[str] = None,
        rules: Optional[RepositoryRulesetRulesArgs] = None,
        ruleset_id: Optional[int] = None,
        target: Optional[str] = None) -> RepositoryRuleset
func GetRepositoryRuleset(ctx *Context, name string, id IDInput, state *RepositoryRulesetState, opts ...ResourceOption) (*RepositoryRuleset, error)
public static RepositoryRuleset Get(string name, Input<string> id, RepositoryRulesetState? state, CustomResourceOptions? opts = null)
public static RepositoryRuleset get(String name, Output<String> id, RepositoryRulesetState state, CustomResourceOptions options)
resources:  _:    type: github:RepositoryRuleset    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BypassActors List<RepositoryRulesetBypassActor>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
Conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
Enforcement string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
Etag string
(String)
Name string
(String) The name of the ruleset.
NodeId string
(String) GraphQL global node id for use with v4 API.
Repository string
(String) Name of the repository to apply rulset to.
Rules RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
RulesetId int
(Number) GitHub ID for the ruleset.
Target string
(String) Possible values are branch and tag.
BypassActors []RepositoryRulesetBypassActorArgs
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
Conditions RepositoryRulesetConditionsArgs
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
Enforcement string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
Etag string
(String)
Name string
(String) The name of the ruleset.
NodeId string
(String) GraphQL global node id for use with v4 API.
Repository string
(String) Name of the repository to apply rulset to.
Rules RepositoryRulesetRulesArgs
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
RulesetId int
(Number) GitHub ID for the ruleset.
Target string
(String) Possible values are branch and tag.
bypassActors List<RepositoryRulesetBypassActor>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
enforcement String
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
etag String
(String)
name String
(String) The name of the ruleset.
nodeId String
(String) GraphQL global node id for use with v4 API.
repository String
(String) Name of the repository to apply rulset to.
rules RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
rulesetId Integer
(Number) GitHub ID for the ruleset.
target String
(String) Possible values are branch and tag.
bypassActors RepositoryRulesetBypassActor[]
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditions
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
enforcement string
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
etag string
(String)
name string
(String) The name of the ruleset.
nodeId string
(String) GraphQL global node id for use with v4 API.
repository string
(String) Name of the repository to apply rulset to.
rules RepositoryRulesetRules
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
rulesetId number
(Number) GitHub ID for the ruleset.
target string
(String) Possible values are branch and tag.
bypass_actors Sequence[RepositoryRulesetBypassActorArgs]
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions RepositoryRulesetConditionsArgs
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
enforcement str
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
etag str
(String)
name str
(String) The name of the ruleset.
node_id str
(String) GraphQL global node id for use with v4 API.
repository str
(String) Name of the repository to apply rulset to.
rules RepositoryRulesetRulesArgs
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
ruleset_id int
(Number) GitHub ID for the ruleset.
target str
(String) Possible values are branch and tag.
bypassActors List<Property Map>
(Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema)
conditions Property Map
(Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema)
enforcement String
(String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization.
etag String
(String)
name String
(String) The name of the ruleset.
nodeId String
(String) GraphQL global node id for use with v4 API.
repository String
(String) Name of the repository to apply rulset to.
rules Property Map
(Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema)
rulesetId Number
(Number) GitHub ID for the ruleset.
target String
(String) Possible values are branch and tag.

Supporting Types

RepositoryRulesetBypassActor
, RepositoryRulesetBypassActorArgs

ActorId This property is required. int
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
ActorType This property is required. string
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
BypassMode This property is required. string

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)
ActorId This property is required. int
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
ActorType This property is required. string
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
BypassMode This property is required. string

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)
actorId This property is required. Integer
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
actorType This property is required. String
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
bypassMode This property is required. String

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)
actorId This property is required. number
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
actorType This property is required. string
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
bypassMode This property is required. string

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)
actor_id This property is required. int
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
actor_type This property is required. str
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
bypass_mode This property is required. str

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)
actorId This property is required. Number
(Number) The ID of the actor that can bypass a ruleset. If actor_type is Integration, actor_id is a GitHub App ID. App ID can be obtained by following instructions from the Get an App API docs
actorType This property is required. String
The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin.
bypassMode This property is required. String

(String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request.

Note: at the time of writing this, the following actor types correspond to the following actor IDs:

  • OrganizationAdmin > 1
  • RepositoryRole (This is the actor type, the following are the base repository roles and their associated IDs.)

RepositoryRulesetConditions
, RepositoryRulesetConditionsArgs

RefName This property is required. RepositoryRulesetConditionsRefName
(Block List, Min: 1, Max: 1) (see below for nested schema)
RefName This property is required. RepositoryRulesetConditionsRefName
(Block List, Min: 1, Max: 1) (see below for nested schema)
refName This property is required. RepositoryRulesetConditionsRefName
(Block List, Min: 1, Max: 1) (see below for nested schema)
refName This property is required. RepositoryRulesetConditionsRefName
(Block List, Min: 1, Max: 1) (see below for nested schema)
ref_name This property is required. RepositoryRulesetConditionsRefName
(Block List, Min: 1, Max: 1) (see below for nested schema)
refName This property is required. Property Map
(Block List, Min: 1, Max: 1) (see below for nested schema)

RepositoryRulesetConditionsRefName
, RepositoryRulesetConditionsRefNameArgs

Excludes This property is required. List<string>
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
Includes This property is required. List<string>
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.
Excludes This property is required. []string
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
Includes This property is required. []string
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.
excludes This property is required. List<String>
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
includes This property is required. List<String>
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.
excludes This property is required. string[]
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
includes This property is required. string[]
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.
excludes This property is required. Sequence[str]
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
includes This property is required. Sequence[str]
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.
excludes This property is required. List<String>
Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.
includes This property is required. List<String>
Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches.

RepositoryRulesetRules
, RepositoryRulesetRulesArgs

BranchNamePattern RepositoryRulesetRulesBranchNamePattern
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
CommitAuthorEmailPattern RepositoryRulesetRulesCommitAuthorEmailPattern
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
CommitMessagePattern RepositoryRulesetRulesCommitMessagePattern
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
CommitterEmailPattern RepositoryRulesetRulesCommitterEmailPattern
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
Creation bool
(Boolean) Only allow users with bypass permission to create matching refs.
Deletion bool
(Boolean) Only allow users with bypass permissions to delete matching refs.
MergeQueue RepositoryRulesetRulesMergeQueue
(Block List, Max: 1) Merges must be performed via a merge queue.
NonFastForward bool
(Boolean) Prevent users with push access from force pushing to branches.
PullRequest RepositoryRulesetRulesPullRequest
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
RequiredCodeScanning RepositoryRulesetRulesRequiredCodeScanning
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
RequiredDeployments RepositoryRulesetRulesRequiredDeployments
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
RequiredLinearHistory bool
(Boolean) Prevent merge commits from being pushed to matching branches.
RequiredSignatures bool
(Boolean) Commits pushed to matching branches must have verified signatures.
RequiredStatusChecks RepositoryRulesetRulesRequiredStatusChecks
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
TagNamePattern RepositoryRulesetRulesTagNamePattern
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
Update bool
(Boolean) Only allow users with bypass permission to update matching refs.
UpdateAllowsFetchAndMerge bool
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
BranchNamePattern RepositoryRulesetRulesBranchNamePattern
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
CommitAuthorEmailPattern RepositoryRulesetRulesCommitAuthorEmailPattern
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
CommitMessagePattern RepositoryRulesetRulesCommitMessagePattern
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
CommitterEmailPattern RepositoryRulesetRulesCommitterEmailPattern
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
Creation bool
(Boolean) Only allow users with bypass permission to create matching refs.
Deletion bool
(Boolean) Only allow users with bypass permissions to delete matching refs.
MergeQueue RepositoryRulesetRulesMergeQueue
(Block List, Max: 1) Merges must be performed via a merge queue.
NonFastForward bool
(Boolean) Prevent users with push access from force pushing to branches.
PullRequest RepositoryRulesetRulesPullRequest
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
RequiredCodeScanning RepositoryRulesetRulesRequiredCodeScanning
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
RequiredDeployments RepositoryRulesetRulesRequiredDeployments
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
RequiredLinearHistory bool
(Boolean) Prevent merge commits from being pushed to matching branches.
RequiredSignatures bool
(Boolean) Commits pushed to matching branches must have verified signatures.
RequiredStatusChecks RepositoryRulesetRulesRequiredStatusChecks
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
TagNamePattern RepositoryRulesetRulesTagNamePattern
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
Update bool
(Boolean) Only allow users with bypass permission to update matching refs.
UpdateAllowsFetchAndMerge bool
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
branchNamePattern RepositoryRulesetRulesBranchNamePattern
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
commitAuthorEmailPattern RepositoryRulesetRulesCommitAuthorEmailPattern
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
commitMessagePattern RepositoryRulesetRulesCommitMessagePattern
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
committerEmailPattern RepositoryRulesetRulesCommitterEmailPattern
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
creation Boolean
(Boolean) Only allow users with bypass permission to create matching refs.
deletion Boolean
(Boolean) Only allow users with bypass permissions to delete matching refs.
mergeQueue RepositoryRulesetRulesMergeQueue
(Block List, Max: 1) Merges must be performed via a merge queue.
nonFastForward Boolean
(Boolean) Prevent users with push access from force pushing to branches.
pullRequest RepositoryRulesetRulesPullRequest
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
requiredCodeScanning RepositoryRulesetRulesRequiredCodeScanning
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
requiredDeployments RepositoryRulesetRulesRequiredDeployments
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
requiredLinearHistory Boolean
(Boolean) Prevent merge commits from being pushed to matching branches.
requiredSignatures Boolean
(Boolean) Commits pushed to matching branches must have verified signatures.
requiredStatusChecks RepositoryRulesetRulesRequiredStatusChecks
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
tagNamePattern RepositoryRulesetRulesTagNamePattern
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
update Boolean
(Boolean) Only allow users with bypass permission to update matching refs.
updateAllowsFetchAndMerge Boolean
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
branchNamePattern RepositoryRulesetRulesBranchNamePattern
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
commitAuthorEmailPattern RepositoryRulesetRulesCommitAuthorEmailPattern
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
commitMessagePattern RepositoryRulesetRulesCommitMessagePattern
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
committerEmailPattern RepositoryRulesetRulesCommitterEmailPattern
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
creation boolean
(Boolean) Only allow users with bypass permission to create matching refs.
deletion boolean
(Boolean) Only allow users with bypass permissions to delete matching refs.
mergeQueue RepositoryRulesetRulesMergeQueue
(Block List, Max: 1) Merges must be performed via a merge queue.
nonFastForward boolean
(Boolean) Prevent users with push access from force pushing to branches.
pullRequest RepositoryRulesetRulesPullRequest
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
requiredCodeScanning RepositoryRulesetRulesRequiredCodeScanning
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
requiredDeployments RepositoryRulesetRulesRequiredDeployments
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
requiredLinearHistory boolean
(Boolean) Prevent merge commits from being pushed to matching branches.
requiredSignatures boolean
(Boolean) Commits pushed to matching branches must have verified signatures.
requiredStatusChecks RepositoryRulesetRulesRequiredStatusChecks
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
tagNamePattern RepositoryRulesetRulesTagNamePattern
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
update boolean
(Boolean) Only allow users with bypass permission to update matching refs.
updateAllowsFetchAndMerge boolean
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
branch_name_pattern RepositoryRulesetRulesBranchNamePattern
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
commit_author_email_pattern RepositoryRulesetRulesCommitAuthorEmailPattern
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
commit_message_pattern RepositoryRulesetRulesCommitMessagePattern
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
committer_email_pattern RepositoryRulesetRulesCommitterEmailPattern
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
creation bool
(Boolean) Only allow users with bypass permission to create matching refs.
deletion bool
(Boolean) Only allow users with bypass permissions to delete matching refs.
merge_queue RepositoryRulesetRulesMergeQueue
(Block List, Max: 1) Merges must be performed via a merge queue.
non_fast_forward bool
(Boolean) Prevent users with push access from force pushing to branches.
pull_request RepositoryRulesetRulesPullRequest
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
required_code_scanning RepositoryRulesetRulesRequiredCodeScanning
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
required_deployments RepositoryRulesetRulesRequiredDeployments
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
required_linear_history bool
(Boolean) Prevent merge commits from being pushed to matching branches.
required_signatures bool
(Boolean) Commits pushed to matching branches must have verified signatures.
required_status_checks RepositoryRulesetRulesRequiredStatusChecks
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
tag_name_pattern RepositoryRulesetRulesTagNamePattern
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
update bool
(Boolean) Only allow users with bypass permission to update matching refs.
update_allows_fetch_and_merge bool
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
branchNamePattern Property Map
(Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applied to rulesets with target branch. (see below for nested schema)
commitAuthorEmailPattern Property Map
(Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
commitMessagePattern Property Map
(Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
committerEmailPattern Property Map
(Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema)
creation Boolean
(Boolean) Only allow users with bypass permission to create matching refs.
deletion Boolean
(Boolean) Only allow users with bypass permissions to delete matching refs.
mergeQueue Property Map
(Block List, Max: 1) Merges must be performed via a merge queue.
nonFastForward Boolean
(Boolean) Prevent users with push access from force pushing to branches.
pullRequest Property Map
(Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema)
requiredCodeScanning Property Map
(Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema)
requiredDeployments Property Map
(Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see below for nested schema)
requiredLinearHistory Boolean
(Boolean) Prevent merge commits from being pushed to matching branches.
requiredSignatures Boolean
(Boolean) Commits pushed to matching branches must have verified signatures.
requiredStatusChecks Property Map
(Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see below for nested schema)
tagNamePattern Property Map
(Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applied to rulesets with target tag. (see below for nested schema)
update Boolean
(Boolean) Only allow users with bypass permission to update matching refs.
updateAllowsFetchAndMerge Boolean
(Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires update to be set to true. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.

RepositoryRulesetRulesBranchNamePattern
, RepositoryRulesetRulesBranchNamePatternArgs

Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.
operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. string
The pattern to match with.
name string
(String) The name of the ruleset.
negate boolean
If true, the rule will fail if the pattern matches.
operator This property is required. str
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. str
The pattern to match with.
name str
(String) The name of the ruleset.
negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.

RepositoryRulesetRulesCommitAuthorEmailPattern
, RepositoryRulesetRulesCommitAuthorEmailPatternArgs

Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.
operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. string
The pattern to match with.
name string
(String) The name of the ruleset.
negate boolean
If true, the rule will fail if the pattern matches.
operator This property is required. str
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. str
The pattern to match with.
name str
(String) The name of the ruleset.
negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.

RepositoryRulesetRulesCommitMessagePattern
, RepositoryRulesetRulesCommitMessagePatternArgs

Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.
operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. string
The pattern to match with.
name string
(String) The name of the ruleset.
negate boolean
If true, the rule will fail if the pattern matches.
operator This property is required. str
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. str
The pattern to match with.
name str
(String) The name of the ruleset.
negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.

RepositoryRulesetRulesCommitterEmailPattern
, RepositoryRulesetRulesCommitterEmailPatternArgs

Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.
operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. string
The pattern to match with.
name string
(String) The name of the ruleset.
negate boolean
If true, the rule will fail if the pattern matches.
operator This property is required. str
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. str
The pattern to match with.
name str
(String) The name of the ruleset.
negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.

RepositoryRulesetRulesMergeQueue
, RepositoryRulesetRulesMergeQueueArgs

CheckResponseTimeoutMinutes int
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
GroupingStrategy string
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
MaxEntriesToBuild int
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
MaxEntriesToMerge int
The maximum number of PRs that will be merged together in a group. Defaults to 5.
MergeMethod string
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
MinEntriesToMerge int
The minimum number of PRs that will be merged together in a group. Defaults to 1.
MinEntriesToMergeWaitMinutes int
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.
CheckResponseTimeoutMinutes int
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
GroupingStrategy string
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
MaxEntriesToBuild int
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
MaxEntriesToMerge int
The maximum number of PRs that will be merged together in a group. Defaults to 5.
MergeMethod string
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
MinEntriesToMerge int
The minimum number of PRs that will be merged together in a group. Defaults to 1.
MinEntriesToMergeWaitMinutes int
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.
checkResponseTimeoutMinutes Integer
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
groupingStrategy String
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
maxEntriesToBuild Integer
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
maxEntriesToMerge Integer
The maximum number of PRs that will be merged together in a group. Defaults to 5.
mergeMethod String
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
minEntriesToMerge Integer
The minimum number of PRs that will be merged together in a group. Defaults to 1.
minEntriesToMergeWaitMinutes Integer
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.
checkResponseTimeoutMinutes number
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
groupingStrategy string
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
maxEntriesToBuild number
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
maxEntriesToMerge number
The maximum number of PRs that will be merged together in a group. Defaults to 5.
mergeMethod string
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
minEntriesToMerge number
The minimum number of PRs that will be merged together in a group. Defaults to 1.
minEntriesToMergeWaitMinutes number
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.
check_response_timeout_minutes int
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
grouping_strategy str
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
max_entries_to_build int
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
max_entries_to_merge int
The maximum number of PRs that will be merged together in a group. Defaults to 5.
merge_method str
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
min_entries_to_merge int
The minimum number of PRs that will be merged together in a group. Defaults to 1.
min_entries_to_merge_wait_minutes int
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.
checkResponseTimeoutMinutes Number
Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to 60.
groupingStrategy String
When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to ALLGREEN.
maxEntriesToBuild Number
Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to 5.
maxEntriesToMerge Number
The maximum number of PRs that will be merged together in a group. Defaults to 5.
mergeMethod String
Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to MERGE.
minEntriesToMerge Number
The minimum number of PRs that will be merged together in a group. Defaults to 1.
minEntriesToMergeWaitMinutes Number
The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to 5.

RepositoryRulesetRulesPullRequest
, RepositoryRulesetRulesPullRequestArgs

DismissStaleReviewsOnPush bool
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
RequireCodeOwnerReview bool
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
RequireLastPushApproval bool
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
RequiredApprovingReviewCount int
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
RequiredReviewThreadResolution bool
All conversations on code must be resolved before a pull request can be merged. Defaults to false.
DismissStaleReviewsOnPush bool
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
RequireCodeOwnerReview bool
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
RequireLastPushApproval bool
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
RequiredApprovingReviewCount int
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
RequiredReviewThreadResolution bool
All conversations on code must be resolved before a pull request can be merged. Defaults to false.
dismissStaleReviewsOnPush Boolean
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
requireCodeOwnerReview Boolean
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
requireLastPushApproval Boolean
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
requiredApprovingReviewCount Integer
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
requiredReviewThreadResolution Boolean
All conversations on code must be resolved before a pull request can be merged. Defaults to false.
dismissStaleReviewsOnPush boolean
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
requireCodeOwnerReview boolean
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
requireLastPushApproval boolean
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
requiredApprovingReviewCount number
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
requiredReviewThreadResolution boolean
All conversations on code must be resolved before a pull request can be merged. Defaults to false.
dismiss_stale_reviews_on_push bool
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
require_code_owner_review bool
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
require_last_push_approval bool
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
required_approving_review_count int
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
required_review_thread_resolution bool
All conversations on code must be resolved before a pull request can be merged. Defaults to false.
dismissStaleReviewsOnPush Boolean
New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false.
requireCodeOwnerReview Boolean
Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false.
requireLastPushApproval Boolean
Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false.
requiredApprovingReviewCount Number
The number of approving reviews that are required before a pull request can be merged. Defaults to 0.
requiredReviewThreadResolution Boolean
All conversations on code must be resolved before a pull request can be merged. Defaults to false.

RepositoryRulesetRulesRequiredCodeScanning
, RepositoryRulesetRulesRequiredCodeScanningArgs

RequiredCodeScanningTools This property is required. List<RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool>
Tools that must provide code scanning results for this rule to pass.
RequiredCodeScanningTools This property is required. []RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool
Tools that must provide code scanning results for this rule to pass.
requiredCodeScanningTools This property is required. List<RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool>
Tools that must provide code scanning results for this rule to pass.
requiredCodeScanningTools This property is required. RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool[]
Tools that must provide code scanning results for this rule to pass.
required_code_scanning_tools This property is required. Sequence[RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool]
Tools that must provide code scanning results for this rule to pass.
requiredCodeScanningTools This property is required. List<Property Map>
Tools that must provide code scanning results for this rule to pass.

RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningTool
, RepositoryRulesetRulesRequiredCodeScanningRequiredCodeScanningToolArgs

AlertsThreshold This property is required. string
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
SecurityAlertsThreshold This property is required. string
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
Tool This property is required. string
The name of a code scanning tool
AlertsThreshold This property is required. string
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
SecurityAlertsThreshold This property is required. string
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
Tool This property is required. string
The name of a code scanning tool
alertsThreshold This property is required. String
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
securityAlertsThreshold This property is required. String
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
tool This property is required. String
The name of a code scanning tool
alertsThreshold This property is required. string
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
securityAlertsThreshold This property is required. string
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
tool This property is required. string
The name of a code scanning tool
alerts_threshold This property is required. str
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
security_alerts_threshold This property is required. str
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
tool This property is required. str
The name of a code scanning tool
alertsThreshold This property is required. String
The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all.
securityAlertsThreshold This property is required. String
The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all.
tool This property is required. String
The name of a code scanning tool

RepositoryRulesetRulesRequiredDeployments
, RepositoryRulesetRulesRequiredDeploymentsArgs

RequiredDeploymentEnvironments This property is required. List<string>
The environments that must be successfully deployed to before branches can be merged.
RequiredDeploymentEnvironments This property is required. []string
The environments that must be successfully deployed to before branches can be merged.
requiredDeploymentEnvironments This property is required. List<String>
The environments that must be successfully deployed to before branches can be merged.
requiredDeploymentEnvironments This property is required. string[]
The environments that must be successfully deployed to before branches can be merged.
required_deployment_environments This property is required. Sequence[str]
The environments that must be successfully deployed to before branches can be merged.
requiredDeploymentEnvironments This property is required. List<String>
The environments that must be successfully deployed to before branches can be merged.

RepositoryRulesetRulesRequiredStatusChecks
, RepositoryRulesetRulesRequiredStatusChecksArgs

RequiredChecks This property is required. List<RepositoryRulesetRulesRequiredStatusChecksRequiredCheck>
Status checks that are required. Several can be defined.
DoNotEnforceOnCreate bool
Allow repositories and branches to be created if a check would otherwise prohibit it.
StrictRequiredStatusChecksPolicy bool
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.
RequiredChecks This property is required. []RepositoryRulesetRulesRequiredStatusChecksRequiredCheck
Status checks that are required. Several can be defined.
DoNotEnforceOnCreate bool
Allow repositories and branches to be created if a check would otherwise prohibit it.
StrictRequiredStatusChecksPolicy bool
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.
requiredChecks This property is required. List<RepositoryRulesetRulesRequiredStatusChecksRequiredCheck>
Status checks that are required. Several can be defined.
doNotEnforceOnCreate Boolean
Allow repositories and branches to be created if a check would otherwise prohibit it.
strictRequiredStatusChecksPolicy Boolean
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.
requiredChecks This property is required. RepositoryRulesetRulesRequiredStatusChecksRequiredCheck[]
Status checks that are required. Several can be defined.
doNotEnforceOnCreate boolean
Allow repositories and branches to be created if a check would otherwise prohibit it.
strictRequiredStatusChecksPolicy boolean
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.
required_checks This property is required. Sequence[RepositoryRulesetRulesRequiredStatusChecksRequiredCheck]
Status checks that are required. Several can be defined.
do_not_enforce_on_create bool
Allow repositories and branches to be created if a check would otherwise prohibit it.
strict_required_status_checks_policy bool
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.
requiredChecks This property is required. List<Property Map>
Status checks that are required. Several can be defined.
doNotEnforceOnCreate Boolean
Allow repositories and branches to be created if a check would otherwise prohibit it.
strictRequiredStatusChecksPolicy Boolean
Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false.

RepositoryRulesetRulesRequiredStatusChecksRequiredCheck
, RepositoryRulesetRulesRequiredStatusChecksRequiredCheckArgs

Context This property is required. string
The status check context name that must be present on the commit.
IntegrationId int
The optional integration ID that this status check must originate from.
Context This property is required. string
The status check context name that must be present on the commit.
IntegrationId int
The optional integration ID that this status check must originate from.
context This property is required. String
The status check context name that must be present on the commit.
integrationId Integer
The optional integration ID that this status check must originate from.
context This property is required. string
The status check context name that must be present on the commit.
integrationId number
The optional integration ID that this status check must originate from.
context This property is required. str
The status check context name that must be present on the commit.
integration_id int
The optional integration ID that this status check must originate from.
context This property is required. String
The status check context name that must be present on the commit.
integrationId Number
The optional integration ID that this status check must originate from.

RepositoryRulesetRulesTagNamePattern
, RepositoryRulesetRulesTagNamePatternArgs

Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
Operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
Pattern This property is required. string
The pattern to match with.
Name string
(String) The name of the ruleset.
Negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.
operator This property is required. string
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. string
The pattern to match with.
name string
(String) The name of the ruleset.
negate boolean
If true, the rule will fail if the pattern matches.
operator This property is required. str
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. str
The pattern to match with.
name str
(String) The name of the ruleset.
negate bool
If true, the rule will fail if the pattern matches.
operator This property is required. String
The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex.
pattern This property is required. String
The pattern to match with.
name String
(String) The name of the ruleset.
negate Boolean
If true, the rule will fail if the pattern matches.

Import

GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g.

$ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345`
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.