Skip to content

Commit

Permalink
Merge pull request #1457 from alphagov/set-github-team-permission
Browse files Browse the repository at this point in the history
Add ability to specify GitHub Team permissions
  • Loading branch information
theseanything authored Oct 3, 2024
2 parents fc82f44 + fffdf83 commit 67bea9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions terraform/deployments/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ resource "github_team_repository" "govuk_production_admin_repos" {
for_each = local.repositories
repository = each.key
team_id = github_team.govuk_production_admin.id
permission = "admin"
permission = try(each.value.teams["govuk_production_admin"], "admin")
}

resource "github_team_repository" "govuk_ci_bots_repos" {
for_each = local.repositories
repository = each.key
team_id = github_team.govuk_ci_bots.id
permission = "admin"
permission = try(each.value.teams["govuk_ci_bots"], "admin")
}

resource "github_team_repository" "govuk_repos" {
for_each = local.repositories
repository = each.key
team_id = github_team.govuk.id
permission = "push"
permission = try(each.value.teams["govuk"], "push")
}

resource "github_repository" "govuk_repos" {
Expand Down
6 changes: 5 additions & 1 deletion terraform/deployments/github/repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,4 +844,8 @@ repos:
govuk-ruby-images: {}
govuk-s3-mirror: {}
gds_zendesk: {}
govuk-design-guide: {}
govuk-design-guide: {
teams: {
govuk: "maintain"
}
}

0 comments on commit 67bea9d

Please sign in to comment.