This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
generated from ContainerSSH/library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
community.tf
117 lines (104 loc) · 2.7 KB
/
community.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
resource "github_repository" "community" {
name = "community"
description = "ContainerSSH community documentation"
has_issues = true
has_projects = false
has_wiki = false
has_downloads = false
vulnerability_alerts = true
default_branch = "main"
homepage_url = "https://containerssh.io/"
allow_merge_commit = false
allow_squash_merge = true
allow_rebase_merge = true
allow_auto_merge = false
delete_branch_on_merge = true
topics = [
"containerssh",
"infrastructure",
"community",
]
lifecycle {
ignore_changes = [
template,
has_downloads,
topics,
]
prevent_destroy = true
}
}
resource "github_team_repository" "community" {
repository = github_repository.community.name
team_id = github_team.chairs.id
permission = "admin"
}
resource "github_branch_protection" "community" {
repository_id = github_repository.community.node_id
pattern = "main"
enforce_admins = true
require_signed_commits = false
required_pull_request_reviews {
dismiss_stale_reviews = true
required_approving_review_count = 2
}
required_status_checks {
strict = true
contexts = []
}
push_restrictions = [
github_team.chairs.node_id,
github_team.bots.node_id,
]
}
resource "github_repository" "github" {
name = ".github"
description = "ContainerSSH organization-wide repository"
has_issues = true
has_projects = false
has_wiki = false
has_downloads = false
vulnerability_alerts = true
default_branch = "main"
homepage_url = "https://containerssh.io/"
allow_merge_commit = false
allow_squash_merge = true
allow_rebase_merge = true
allow_auto_merge = true
delete_branch_on_merge = true
topics = [
"containerssh",
"infrastructure",
"community",
]
lifecycle {
ignore_changes = [
template,
has_downloads,
topics,
]
prevent_destroy = true
}
}
resource "github_team_repository" "github" {
repository = github_repository.github.name
team_id = github_team.chairs.id
permission = "admin"
}
resource "github_branch_protection" "github" {
repository_id = github_repository.github.node_id
pattern = "main"
enforce_admins = false
require_signed_commits = false
required_pull_request_reviews {
dismiss_stale_reviews = true
required_approving_review_count = 1
}
required_status_checks {
strict = true
contexts = []
}
push_restrictions = [
github_team.chairs.node_id,
github_team.bots.node_id,
]
}