import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a GitHub repository collaborators resource. * * > Note: github.RepositoryCollaborators cannot be used in conjunction with github.RepositoryCollaborator and * github.TeamRepository or they will fight over what your policy should be. * * This resource allows you to manage all collaborators for repositories in your * organization or personal account. For organization repositories, collaborators can * have explicit (and differing levels of) read, write, or administrator access to * specific repositories, without giving the user full organization membership. * For personal repositories, collaborators can only be granted write * (implicitly includes read) permission. * * When applied, an invitation will be sent to the user to become a collaborators * on a repository. When destroyed, either the invitation will be cancelled or the * collaborators will be removed from the repository. * * > **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. * * This resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use * github.RepositoryCollaborator instead. * * Further documentation on GitHub collaborators: * * - [Adding outside collaborators to your personal repositories](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories) * - [Adding outside collaborators to repositories in your organization](https://help.github.com/articles/adding-outside-collaborators-to-repositories-in-your-organization/) * - [Converting an organization member to an outside collaborators](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * // Add collaborators to a repository * const someTeam = new github.Team("some_team", { * name: "SomeTeam", * description: "Some cool team", * }); * const someRepo = new github.Repository("some_repo", {name: "some-repo"}); * const someRepoCollaborators = new github.RepositoryCollaborators("some_repo_collaborators", { * repository: someRepo.name, * users: [{ * permission: "admin", * username: "SomeUser", * }], * teams: [{ * permission: "pull", * teamId: someTeam.slug, * }], * }); * ``` */ export declare class RepositoryCollaborators extends pulumi.CustomResource { /** * Get an existing RepositoryCollaborators 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?: RepositoryCollaboratorsState, opts?: pulumi.CustomResourceOptions): RepositoryCollaborators; /** * Returns true if the given object is an instance of RepositoryCollaborators. 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 RepositoryCollaborators; /** * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. */ readonly ignoreTeams: pulumi.Output; /** * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. */ readonly invitationIds: pulumi.Output<{ [key: string]: string; }>; /** * The GitHub repository. */ readonly repository: pulumi.Output; /** * ID of the repository. */ readonly repositoryId: pulumi.Output; /** * List of teams to grant access to the repository. */ readonly teams: pulumi.Output; /** * List of users to grant access to the repository. */ readonly users: pulumi.Output; /** * Create a RepositoryCollaborators 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: RepositoryCollaboratorsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RepositoryCollaborators resources. */ export interface RepositoryCollaboratorsState { /** * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. */ ignoreTeams?: pulumi.Input[] | undefined>; /** * Map of usernames to invitation ID for any users added as part of creation of this resource to * be used in `github.UserInvitationAccepter`. */ invitationIds?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The GitHub repository. */ repository?: pulumi.Input; /** * ID of the repository. */ repositoryId?: pulumi.Input; /** * List of teams to grant access to the repository. */ teams?: pulumi.Input[] | undefined>; /** * List of users to grant access to the repository. */ users?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a RepositoryCollaborators resource. */ export interface RepositoryCollaboratorsArgs { /** * List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. */ ignoreTeams?: pulumi.Input[] | undefined>; /** * The GitHub repository. */ repository: pulumi.Input; /** * List of teams to grant access to the repository. */ teams?: pulumi.Input[] | undefined>; /** * List of users to grant access to the repository. */ users?: pulumi.Input[] | undefined>; } //# sourceMappingURL=repositoryCollaborators.d.ts.map