Skip to content

Commit

Permalink
Add a .github repository for organization-level documentation. (#380)
Browse files Browse the repository at this point in the history
* Add a .github repository for organization-level documentation.

terraform fmt.

* Fix ros2_gbp docs team name.

* Use property instead of string.
  • Loading branch information
nuclearsandwich authored Nov 20, 2023
1 parent ffc97b1 commit 7cd11af
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions 00-members.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ locals {
local.robot_localization_team,
local.robotis_team,
local.robotwebtools_team,
local.ros2_gbp_docs_team,
local.ros_admins,
local.ros_canopen_team,
local.ros_event_camera_team,
Expand Down
46 changes: 46 additions & 0 deletions 00-ros2_gbp.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
locals {
ros2_gbp_docs_team = [
"kscottz",
]
}

resource "github_repository" "dotgithub" {
name = ".github"
visibility = "public"
lifecycle {
# Plans that destroy repository releases will delete the repository on
# GitHub and that shouldn't be done in the normal course of operation.
prevent_destroy = true
# Ignore fields that are not set or managed by this terraform project
# to prevent unecessary drift.
ignore_changes = [
allow_merge_commit,
description,
has_downloads,
has_projects,
has_issues,
has_wiki,
vulnerability_alerts
]
}
}

resource "github_team" "docs_team" {
name = "ros2-gbp-docs"
description = "ros2-gbp documentation contributors"
privacy = "closed"
create_default_maintainer = false
}

resource "github_team_membership" "docs_team" {
for_each = toset(local.ros2_gbp_docs_team)
team_id = github_team.docs_team.id
username = each.value
role = "member"
}

resource "github_team_repository" "docs_team" {
team_id = github_team.docs_team.id
repository = github_repository.dotgithub.name
permission = "maintain"
}

0 comments on commit 7cd11af

Please sign in to comment.