Skip to content

Commit 625a8c7

Browse files
feat: add JSON schema doc for settings
1 parent 777a97f commit 625a8c7

File tree

1 file changed

+196
-0
lines changed

1 file changed

+196
-0
lines changed

settings.schema.json

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"type": "object",
4+
"properties": {
5+
"repositories": {
6+
"allOf": [
7+
{
8+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1repos~1{owner}~1{repo}/patch/requestBody/content/application~1json/schema"
9+
},
10+
{
11+
"type": "object",
12+
"properties": {
13+
"auto_init": {
14+
"description": "Create an initial commit with empty README. Keep this set to true in most cases since many of the policies below cannot be implemented on bare repos",
15+
"type": "boolean"
16+
},
17+
"gitignore_template": {
18+
"description": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, 'Haskell'.",
19+
"type": "string"
20+
},
21+
"license_template": {
22+
"description": "Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, 'mit' or 'mpl-2.0'.",
23+
"type": "string"
24+
},
25+
"topics": {
26+
"description": "A list of topics to set on the repository",
27+
"type": "array",
28+
"items": {
29+
"type": "string"
30+
}
31+
},
32+
"security": {
33+
"description": "Settings for Code security and analysis",
34+
"type": "object",
35+
"properties": {
36+
"enableVulnerabilityAlerts": {
37+
"type": "boolean"
38+
},
39+
"enableAutomatedSecurityFixes": {
40+
"type": "boolean"
41+
}
42+
}
43+
}
44+
}
45+
}
46+
]
47+
},
48+
"labels": {
49+
"description": "Labels: define labels for Issues and Pull Requests",
50+
"type": "object",
51+
"properties": {
52+
"include": {
53+
"type": "array",
54+
"items": {
55+
"type": "object",
56+
"properties": {
57+
"name": {
58+
"type": "string"
59+
},
60+
"color": {
61+
"description": "The hexadecimal color code for the label. If including a `#`, make sure to wrap it with quotes!",
62+
"type": "string"
63+
},
64+
"description": {
65+
"type": "string"
66+
},
67+
"oldname": {
68+
"description": "Include the old name to rename an existing label",
69+
"type": "string"
70+
}
71+
}
72+
}
73+
},
74+
"exclude": {
75+
"description": "Ignore any labels matching these regexes (don't delete them)",
76+
"type": "array",
77+
"items": {
78+
"type": "string"
79+
}
80+
}
81+
}
82+
},
83+
"milestones": {
84+
"description": "Milestones: define milestones for Issues and Pull Requests",
85+
"type": "array",
86+
"items": {
87+
"type": "object",
88+
"properties": {
89+
"title": {
90+
"type": "string"
91+
},
92+
"description": {
93+
"type": "string"
94+
},
95+
"state": {
96+
"description": "The state of the milestone. Either `open` or `closed`",
97+
"type": "string"
98+
}
99+
}
100+
}
101+
},
102+
"collaborators": {
103+
"description": "Collaborators: give specific users access to any repository.",
104+
"type": "array",
105+
"items": {
106+
"allOf": [
107+
{
108+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1repos~1{owner}~1{repo}~1collaborators~1{username}/put/requestBody/content/application~1json/schema"
109+
},
110+
{
111+
"type": "object",
112+
"properties": {
113+
"username": {
114+
"type": "string"
115+
},
116+
"exclude": {
117+
"description": "You can exclude a list of repos for this collaborator and all repos except these repos would have this collaborator",
118+
"type": "array",
119+
"items": {
120+
"type": "string"
121+
}
122+
},
123+
"include": {
124+
"description": "You can include a list of repos for this collaborator and only those repos would have this collaborator",
125+
"type": "array",
126+
"items": {
127+
"type": "string"
128+
}
129+
}
130+
}
131+
}
132+
]
133+
}
134+
},
135+
"teams": {
136+
"description": "Teams",
137+
"type": "array",
138+
"items": {
139+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1orgs~1{org}~1teams/post/requestBody/content/application~1json/schema"
140+
}
141+
},
142+
"branches": {
143+
"description": "Branch protection rules",
144+
"type": "array",
145+
"items": {
146+
"properties": {
147+
"name": {
148+
"description": "If the name of the branch value is specified as `default`, then the app will create a branch protection rule to apply against the default branch in the repo",
149+
"type": "string"
150+
},
151+
"protection": {
152+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1repos~1{owner}~1{repo}~1branches~1{branch}~1protection/put/requestBody/content/application~1json/schema"
153+
}
154+
}
155+
}
156+
},
157+
"custom_properties": {
158+
"description": "Custom properties",
159+
"type": "array",
160+
"items": {
161+
"type": "object",
162+
"properties": {
163+
"name": {
164+
"type": "string"
165+
},
166+
"value": {
167+
"type": "string"
168+
}
169+
}
170+
}
171+
},
172+
"autolinks": {
173+
"description": "Autolinks",
174+
"type": "array",
175+
"items": {
176+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1repos~1{owner}~1{repo}~1autolinks/post/requestBody/content/application~1json/schema"
177+
}
178+
},
179+
"validator": {
180+
"description": "Repository name validation",
181+
"type": "object",
182+
"properties": {
183+
"pattern": {
184+
"type": "string"
185+
}
186+
}
187+
},
188+
"rulesets": {
189+
"description": "Rulesets",
190+
"type": "array",
191+
"items": {
192+
"$ref": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.2022-11-28.json#/paths/~1orgs~1{org}~1rulesets/post/requestBody/content/application~1json/schema"
193+
}
194+
}
195+
}
196+
}

0 commit comments

Comments
 (0)