TeamRepository

class TeamRepository : KotlinCustomResource

Note: github.TeamRepository cannot be used in conjunction with github.RepositoryCollaborators or they will fight over what your policy should be. This resource manages relationships between teams and repositories in your GitHub organization. Creating this resource grants a particular team permissions on a particular repository. The repository and the team must both belong to the same organization on GitHub. This resource does not actually create any repositories; to do that, see github.Repository. This resource is non-authoritative, for managing ALL collaborators of a repo, use github.RepositoryCollaborators instead.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Team;
import com.pulumi.github.TeamArgs;
import com.pulumi.github.Repository;
import com.pulumi.github.TeamRepository;
import com.pulumi.github.TeamRepositoryArgs;
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 someTeam = new Team("someTeam", TeamArgs.builder()
.description("Some cool team")
.build());
var someRepo = new Repository("someRepo");
var someTeamRepo = new TeamRepository("someTeamRepo", TeamRepositoryArgs.builder()
.teamId(someTeam.id())
.repository(someRepo.name())
.permission("pull")
.build());
}
}

Import

GitHub Team Repository can be imported using an ID made up of team_id:repository or team_name:repository, e.g.

$ pulumi import github:index/teamRepository:TeamRepository terraform_repo 1234567:terraform
$ pulumi import github:index/teamRepository:TeamRepository terraform_repo Administrators:terraform

Properties

Link copied to clipboard
val etag: Output<String>
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val permission: Output<String>?

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organisation. Defaults to pull.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val repository: Output<String>

The repository to add to the team.

Link copied to clipboard
val teamId: Output<String>

The GitHub team id or the GitHub team slug

Link copied to clipboard
val urn: Output<String>