Skip to content

Commit

Permalink
Add ability to specify GitHub Team permissions
Browse files Browse the repository at this point in the history
We need to govuk team maintainer permissions for the govuk-design-guide
as non production team members need merge permissions.
  • Loading branch information
theseanything committed Oct 3, 2024
1 parent fc82f44 commit fffdf83
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 fffdf83

Please sign in to comment.