import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * 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 * * ```typescript * 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"], * }, * }, * }); * ``` * * ## Import * * GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. * * ```sh * $ pulumi import github:index/repositoryRuleset:RepositoryRuleset example example:12345` * ``` */ export declare class RepositoryRuleset extends pulumi.CustomResource { /** * Get an existing RepositoryRuleset resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RepositoryRulesetState, opts?: pulumi.CustomResourceOptions): RepositoryRuleset; /** * Returns true if the given object is an instance of RepositoryRuleset. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RepositoryRuleset; /** * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) */ readonly bypassActors: pulumi.Output; /** * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) */ readonly conditions: pulumi.Output; /** * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. */ readonly enforcement: pulumi.Output; /** * (String) */ readonly etag: pulumi.Output; /** * (String) The name of the ruleset. */ readonly name: pulumi.Output; /** * (String) GraphQL global node id for use with v4 API. */ readonly nodeId: pulumi.Output; /** * (String) Name of the repository to apply rulset to. */ readonly repository: pulumi.Output; /** * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) */ readonly rules: pulumi.Output; /** * (Number) GitHub ID for the ruleset. */ readonly rulesetId: pulumi.Output; /** * (String) Possible values are `branch` and `tag`. */ readonly target: pulumi.Output; /** * Create a RepositoryRuleset resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RepositoryRulesetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RepositoryRuleset resources. */ export interface RepositoryRulesetState { /** * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) */ bypassActors?: pulumi.Input[]>; /** * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) */ conditions?: pulumi.Input; /** * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. */ enforcement?: pulumi.Input; /** * (String) */ etag?: pulumi.Input; /** * (String) The name of the ruleset. */ name?: pulumi.Input; /** * (String) GraphQL global node id for use with v4 API. */ nodeId?: pulumi.Input; /** * (String) Name of the repository to apply rulset to. */ repository?: pulumi.Input; /** * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) */ rules?: pulumi.Input; /** * (Number) GitHub ID for the ruleset. */ rulesetId?: pulumi.Input; /** * (String) Possible values are `branch` and `tag`. */ target?: pulumi.Input; } /** * The set of arguments for constructing a RepositoryRuleset resource. */ export interface RepositoryRulesetArgs { /** * (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) */ bypassActors?: pulumi.Input[]>; /** * (Block List, Max: 1) Parameters for a repository ruleset ref name condition. (see below for nested schema) */ conditions?: pulumi.Input; /** * (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. */ enforcement: pulumi.Input; /** * (String) The name of the ruleset. */ name?: pulumi.Input; /** * (String) Name of the repository to apply rulset to. */ repository?: pulumi.Input; /** * (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) */ rules: pulumi.Input; /** * (String) Possible values are `branch` and `tag`. */ target: pulumi.Input; }