Skip to content

Commit

Permalink
feat: add .github repo to store common default docs (#6)
Browse files Browse the repository at this point in the history
* add .github repo

* update gh provider, fix cla label colors, reflect current release please status checks
  • Loading branch information
bharathkkb authored Feb 12, 2021
1 parent 35c308b commit 54eadb7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions gh/labels/labels.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ locals {
},
{
name : "cla: yes",
color : "ff0040",
color : "98fb00",
description : "User has signed the Contributor License Agreement"
},
{
name : "cla: no",
color : "98fb00",
color : "ff0040",
description : "User has not signed the Contributor License Agreement"
}
]
Expand Down
18 changes: 9 additions & 9 deletions gh/modules/actions-repo/repo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ resource "github_repository" "repo" {
resource "github_branch_protection" "branch_protection" {
repository_id = github_repository.repo.node_id
pattern = "main"
# disabled due to https://github.com/terraform-providers/terraform-provider-github/issues/572
# required_status_checks {
# strict = true
# contexts = var.status_checks
# }
required_status_checks {
strict = true
contexts = var.status_checks
}
required_pull_request_reviews {
dismiss_stale_reviews = false
}
}

resource "github_repository_collaborator" "google_bot" {
count = var.allow_google_bot ? 1 : 0
repository = github_repository.repo.name
username = "google-github-actions-bot"
permission = "triage"
count = var.allow_google_bot ? 1 : 0
repository = github_repository.repo.name
username = "google-github-actions-bot"
permission = "triage"
permission_diff_suppression = true
}
2 changes: 1 addition & 1 deletion gh/repos/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

provider "github" {
version = "~> 3.1.0"
version = "~> 4.4.0"
organization = local.gh_org
}

Expand Down
6 changes: 6 additions & 0 deletions gh/repos/repos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ locals {
name : "release-please-action",
description : "automated releases based on conventional commits",
templated : false
status_checks : ["cla/google", "test (12)"]
},
{
name : ".github",
description : "Default files for google-github-actions",
templated : false
},
]
}
Expand Down

0 comments on commit 54eadb7

Please sign in to comment.