Skip to content

Commit 33c8b89

Browse files
Update all contributors schema (#3853)
* Remove enum of valid contribution types * Add commitType property * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use anyOf for contribution types array --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3623312 commit 33c8b89

File tree

3 files changed

+81
-37
lines changed

3 files changed

+81
-37
lines changed

src/schemas/json/all-contributors.json

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
],
6060
"default": "angular"
6161
},
62+
"commitType": {
63+
"description": "UNDOCUMENTED: Sets Conventional Commits commit type to be used by the all contributors bot. See https://www.conventionalcommits.org.",
64+
"type": "string",
65+
"default": "docs"
66+
},
6267
"contributorsPerLine": {
6368
"title": "Maximum number of columns for the contributors table",
6469
"type": "number",
@@ -148,42 +153,49 @@
148153
"type": "array",
149154
"minItems": 1,
150155
"items": {
151-
"type": "string",
152-
"minLength": 0,
153-
"enum": [
154-
"a11y",
155-
"audio",
156-
"blog",
157-
"bug",
158-
"business",
159-
"code",
160-
"content",
161-
"data",
162-
"design",
163-
"doc",
164-
"eventOrganizing",
165-
"example",
166-
"financial",
167-
"fundingFinding",
168-
"ideas",
169-
"infra",
170-
"maintenance",
171-
"mentoring",
172-
"platform",
173-
"plugin",
174-
"projectManagement",
175-
"promotion",
176-
"question",
177-
"research",
178-
"review",
179-
"security",
180-
"talk",
181-
"test",
182-
"tool",
183-
"translation",
184-
"tutorial",
185-
"userTesting",
186-
"video"
156+
"anyOf": [
157+
{
158+
"type": "string",
159+
"enum": [
160+
"a11y",
161+
"audio",
162+
"blog",
163+
"bug",
164+
"business",
165+
"code",
166+
"content",
167+
"data",
168+
"design",
169+
"doc",
170+
"eventOrganizing",
171+
"example",
172+
"financial",
173+
"fundingFinding",
174+
"ideas",
175+
"infra",
176+
"maintenance",
177+
"mentoring",
178+
"platform",
179+
"plugin",
180+
"projectManagement",
181+
"promotion",
182+
"question",
183+
"research",
184+
"review",
185+
"security",
186+
"talk",
187+
"test",
188+
"tool",
189+
"translation",
190+
"tutorial",
191+
"userTesting",
192+
"video"
193+
]
194+
},
195+
{
196+
"type": "string",
197+
"minLength": 0
198+
}
187199
]
188200
}
189201
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"badgeTemplate": "[![All Contributors](https://img.shields.io/github/all-contributors/<%= projectOwner %>/<%= projectName %>?color=ee8449&style=flat-square)](#contributors)",
3+
"commit": false,
4+
"commitType": "docs",
5+
"contributorTemplate": "<a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
6+
"contributors": [
7+
{
8+
"avatar_url": "https://avatars1.githubusercontent.com/u/26386270?v=4",
9+
"contributions": ["code", "doc"],
10+
"login": "EndBug",
11+
"name": "Federico Grandi",
12+
"profile": "https://github.com/EndBug"
13+
}
14+
],
15+
"contributorsPerLine": 7,
16+
"contributorsSortAlphabetically": false,
17+
"files": ["README.md", "CONTRIBUTING.md"],
18+
"imageSize": 100,
19+
"linkToUsage": true,
20+
"projectName": "all-contributors",
21+
"projectOwner": "all-contributors",
22+
"repoHost": "https://github.com",
23+
"repoType": "github",
24+
"skipCi": true,
25+
"types": {
26+
"custom": {
27+
"description": "A custom contribution type.",
28+
"link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),",
29+
"symbol": "🔭"
30+
}
31+
}
32+
}

src/negative_test/all-contributors/invalid-contribution.json renamed to src/test/all-contributors/custom-contribution-type.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"contributors": [
66
{
77
"avatar_url": "https://avatars1.githubusercontent.com/u/26386270?v=4",
8-
"contributions": ["code", "doc", "jokes"],
8+
"contributions": ["code", "doc", "custom"],
99
"login": "EndBug",
1010
"name": "Federico Grandi",
1111
"profile": "https://github.com/EndBug"

0 commit comments

Comments
 (0)