import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This resource allows you to create and manage environments for a GitHub repository. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const current = github.getUser({ * username: "", * }); * const example = new github.Repository("example", { * name: "A Repository Project", * description: "My awesome codebase", * }); * const exampleRepositoryEnvironment = new github.RepositoryEnvironment("example", { * environment: "example", * repository: example.name, * preventSelfReview: true, * reviewers: [{ * users: [current.then(current => current.id)], * }], * deploymentBranchPolicy: { * protectedBranches: true, * customBranchPolicies: false, * }, * }); * ``` * * ## Import * * GitHub Repository Environment can be imported using an ID made up of `name` of the repository combined with the `environment` name of the environment, separated by a `:` character, e.g. * * ```sh * $ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily * ``` */ export declare class RepositoryEnvironment extends pulumi.CustomResource { /** * Get an existing RepositoryEnvironment 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?: RepositoryEnvironmentState, opts?: pulumi.CustomResourceOptions): RepositoryEnvironment; /** * Returns true if the given object is an instance of RepositoryEnvironment. 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 RepositoryEnvironment; /** * Can repository admins bypass the environment protections. Defaults to `true`. */ readonly canAdminsBypass: pulumi.Output; /** * The deployment branch policy configuration */ readonly deploymentBranchPolicy: pulumi.Output; /** * The name of the environment. */ readonly environment: pulumi.Output; /** * Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`. */ readonly preventSelfReview: pulumi.Output; /** * The repository of the environment. */ readonly repository: pulumi.Output; /** * The environment reviewers configuration. */ readonly reviewers: pulumi.Output; /** * Amount of time to delay a job after the job is initially triggered. */ readonly waitTimer: pulumi.Output; /** * Create a RepositoryEnvironment 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: RepositoryEnvironmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RepositoryEnvironment resources. */ export interface RepositoryEnvironmentState { /** * Can repository admins bypass the environment protections. Defaults to `true`. */ canAdminsBypass?: pulumi.Input; /** * The deployment branch policy configuration */ deploymentBranchPolicy?: pulumi.Input; /** * The name of the environment. */ environment?: pulumi.Input; /** * Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`. */ preventSelfReview?: pulumi.Input; /** * The repository of the environment. */ repository?: pulumi.Input; /** * The environment reviewers configuration. */ reviewers?: pulumi.Input[]>; /** * Amount of time to delay a job after the job is initially triggered. */ waitTimer?: pulumi.Input; } /** * The set of arguments for constructing a RepositoryEnvironment resource. */ export interface RepositoryEnvironmentArgs { /** * Can repository admins bypass the environment protections. Defaults to `true`. */ canAdminsBypass?: pulumi.Input; /** * The deployment branch policy configuration */ deploymentBranchPolicy?: pulumi.Input; /** * The name of the environment. */ environment: pulumi.Input; /** * Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`. */ preventSelfReview?: pulumi.Input; /** * The repository of the environment. */ repository: pulumi.Input; /** * The environment reviewers configuration. */ reviewers?: pulumi.Input[]>; /** * Amount of time to delay a job after the job is initially triggered. */ waitTimer?: pulumi.Input; }