| layout | github |
|---|---|
| page_title | GitHub: github_team_settings |
| description | Manages the team settings (in particular the request review delegation settings) |
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.
# Add a repository to the team
resource "github_team" "some_team" {
name = "SomeTeam"
description = "Some cool team"
}
resource "github_team_settings" "code_review_settings" {
team_id = github_team.some_team.id
review_request_delegation {
algorithm = "ROUND_ROBIN"
member_count = 1
notify = true
excluded_team_member_node_ids = ["MDQ6VXNlcjU4MzIzMQ=="]
}
}The following arguments are supported:
team_id- (Required) The GitHub team id or the GitHub team slugreview_request_delegation- (Optional) 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.
The following arguments are supported:
algorithm- (Optional) The algorithm to use when assigning pull requests to team members. Supported values areROUND_ROBINandLOAD_BALANCE. Default value isROUND_ROBINmember_count- (Optional) The number of team members to assign to a pull requestnotify- (Optional) whether to notify the entire team when at least one member is also assigned to the pull requestexcluded_team_member_node_ids- (Optional) A list of team member node IDs to exclude from the PR review process. These are GitHub user node IDs that can be obtained from the GitHub GraphQL API.
GitHub Teams can be imported using the GitHub team ID, or the team slug e.g.
$ terraform import github_team.code_review_settings 1234567or,
$ terraform import github_team_settings.code_review_settings SomeTeam