forked from ipdxco/github-as-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.ts
More file actions
93 lines (92 loc) · 1.82 KB
/
schema.ts
File metadata and controls
93 lines (92 loc) · 1.82 KB
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
type ResourceSchema = {
mode: string
index: string
address: string
} & (
| {
type: 'github_membership'
values: {username: string; role: 'admin' | 'member'}
}
| {
type: 'github_branch_protection'
values: {
pattern: string
required_pull_request_reviews?: object[]
required_status_checks?: object[]
}
}
| {
type: 'github_repository_collaborator'
values: {
permission: 'admin' | 'maintain' | 'push' | 'triage' | 'pull'
repository: string
username: string
}
}
| {
type: 'github_repository_file'
values: {
content: string
file: string
repository: string
}
}
| {
type: 'github_issue_label'
values: {
name: string
repository: string
}
}
| {
type: 'github_team_repository'
values: {
repository: string
permission: 'admin' | 'maintain' | 'push' | 'triage' | 'pull'
}
}
| {
type: 'github_repository'
values: {
name: string
pages?: {
source?: object[]
}[]
security_and_analysis?: {
advanced_security?: {
status: string
}[]
secret_scanning?: {
status: string
}[]
secret_scanning_push_protection?: {
status: string
}[]
}[]
template?: object[]
}
}
| {
type: 'github_team_membership'
values: {
username: string
role: 'maintainer' | 'member'
}
}
| {
type: 'github_team'
values: {
name: string
id: string
parent_team_id?: string
}
}
)
export type StateSchema = {
values?: {
root_module?: {
resources?: ResourceSchema[]
}
}
}
export type Id = string