TeamSettingsArgs

data class TeamSettingsArgs(val reviewRequestDelegation: Output<TeamSettingsReviewRequestDelegationArgs>? = null, val teamId: Output<String>? = null) : ConvertibleToJava<TeamSettingsArgs>

This resource manages the team settings (in particular the request review delegation settings) within the organization Creating this resource will alter the team Code Review settings. The team must both belong to the same organization configured in the provider on GitHub.

Note: This resource relies on the v4 GraphQl GitHub API. If this API is not available, or the Stone Crop schema preview is not available, then this resource will not work as intended.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// Add a repository to the team
const someTeam = new github.Team("some_team", {
name: "SomeTeam",
description: "Some cool team",
});
const codeReviewSettings = new github.TeamSettings("code_review_settings", {
teamId: someTeam.id,
reviewRequestDelegation: {
algorithm: "ROUND_ROBIN",
memberCount: 1,
notify: true,
},
});
import pulumi
import pulumi_github as github
# Add a repository to the team
some_team = github.Team("some_team",
name="SomeTeam",
description="Some cool team")
code_review_settings = github.TeamSettings("code_review_settings",
team_id=some_team.id,
review_request_delegation={
"algorithm": "ROUND_ROBIN",
"member_count": 1,
"notify": True,
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// Add a repository to the team
var someTeam = new Github.Team("some_team", new()
{
Name = "SomeTeam",
Description = "Some cool team",
});
var codeReviewSettings = new Github.TeamSettings("code_review_settings", new()
{
TeamId = someTeam.Id,
ReviewRequestDelegation = new Github.Inputs.TeamSettingsReviewRequestDelegationArgs
{
Algorithm = "ROUND_ROBIN",
MemberCount = 1,
Notify = true,
},
});
});
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 {
// Add a repository to the team
someTeam, err := github.NewTeam(ctx, "some_team", &github.TeamArgs{
Name: pulumi.String("SomeTeam"),
Description: pulumi.String("Some cool team"),
})
if err != nil {
return err
}
_, err = github.NewTeamSettings(ctx, "code_review_settings", &github.TeamSettingsArgs{
TeamId: someTeam.ID(),
ReviewRequestDelegation: &github.TeamSettingsReviewRequestDelegationArgs{
Algorithm: pulumi.String("ROUND_ROBIN"),
MemberCount: pulumi.Int(1),
Notify: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
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.TeamSettings;
import com.pulumi.github.TeamSettingsArgs;
import com.pulumi.github.inputs.TeamSettingsReviewRequestDelegationArgs;
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) {
// Add a repository to the team
var someTeam = new Team("someTeam", TeamArgs.builder()
.name("SomeTeam")
.description("Some cool team")
.build());
var codeReviewSettings = new TeamSettings("codeReviewSettings", TeamSettingsArgs.builder()
.teamId(someTeam.id())
.reviewRequestDelegation(TeamSettingsReviewRequestDelegationArgs.builder()
.algorithm("ROUND_ROBIN")
.memberCount(1)
.notify(true)
.build())
.build());
}
}
resources:
# Add a repository to the team
someTeam:
type: github:Team
name: some_team
properties:
name: SomeTeam
description: Some cool team
codeReviewSettings:
type: github:TeamSettings
name: code_review_settings
properties:
teamId: ${someTeam.id}
reviewRequestDelegation:
algorithm: ROUND_ROBIN
memberCount: 1
notify: true

Import

GitHub Teams can be imported using the GitHub team ID, or the team slug e.g.

$ pulumi import github:index/teamSettings:TeamSettings code_review_settings 1234567

or,

$ pulumi import github:index/teamSettings:TeamSettings code_review_settings SomeTeam

Constructors

Link copied to clipboard
constructor(reviewRequestDelegation: Output<TeamSettingsReviewRequestDelegationArgs>? = null, teamId: Output<String>? = null)

Properties

Link copied to clipboard

The settings for delegating code reviews to individuals on behalf of the team. If this block is present, even without any fields, then review request delegation will be enabled for the team. See GitHub Review Request Delegation below for details. See GitHub's documentation for more configuration details.

Link copied to clipboard
val teamId: Output<String>? = null

The GitHub team id or the GitHub team slug

Functions

Link copied to clipboard
open override fun toJava(): TeamSettingsArgs