diff --git a/src/schemas/json/all-contributors.json b/src/schemas/json/all-contributors.json index 6a1f1fa869d..cd9e7ec66b3 100644 --- a/src/schemas/json/all-contributors.json +++ b/src/schemas/json/all-contributors.json @@ -59,6 +59,11 @@ ], "default": "angular" }, + "commitType": { + "description": "UNDOCUMENTED: Sets Conventional Commits commit type to be used by the all contributors bot. See https://www.conventionalcommits.org.", + "type": "string", + "default": "docs" + }, "contributorsPerLine": { "title": "Maximum number of columns for the contributors table", "type": "number", @@ -148,42 +153,49 @@ "type": "array", "minItems": 1, "items": { - "type": "string", - "minLength": 0, - "enum": [ - "a11y", - "audio", - "blog", - "bug", - "business", - "code", - "content", - "data", - "design", - "doc", - "eventOrganizing", - "example", - "financial", - "fundingFinding", - "ideas", - "infra", - "maintenance", - "mentoring", - "platform", - "plugin", - "projectManagement", - "promotion", - "question", - "research", - "review", - "security", - "talk", - "test", - "tool", - "translation", - "tutorial", - "userTesting", - "video" + "anyOf": [ + { + "type": "string", + "enum": [ + "a11y", + "audio", + "blog", + "bug", + "business", + "code", + "content", + "data", + "design", + "doc", + "eventOrganizing", + "example", + "financial", + "fundingFinding", + "ideas", + "infra", + "maintenance", + "mentoring", + "platform", + "plugin", + "projectManagement", + "promotion", + "question", + "research", + "review", + "security", + "talk", + "test", + "tool", + "translation", + "tutorial", + "userTesting", + "video" + ] + }, + { + "type": "string", + "minLength": 0 + } ] } } diff --git a/src/test/all-contributors/commit-type.json b/src/test/all-contributors/commit-type.json new file mode 100644 index 00000000000..e4dbe66eea8 --- /dev/null +++ b/src/test/all-contributors/commit-type.json @@ -0,0 +1,32 @@ +{ + "badgeTemplate": "[![All Contributors](https://img.shields.io/github/all-contributors/<%= projectOwner %>/<%= projectName %>?color=ee8449&style=flat-square)](#contributors)", + "commit": false, + "commitType": "docs", + "contributorTemplate": "\">\" width=\"<%= options.imageSize %>px;\" alt=\"\"/>
<%= contributor.name %>
", + "contributors": [ + { + "avatar_url": "https://avatars1.githubusercontent.com/u/26386270?v=4", + "contributions": ["code", "doc"], + "login": "EndBug", + "name": "Federico Grandi", + "profile": "https://github.com/EndBug" + } + ], + "contributorsPerLine": 7, + "contributorsSortAlphabetically": false, + "files": ["README.md", "CONTRIBUTING.md"], + "imageSize": 100, + "linkToUsage": true, + "projectName": "all-contributors", + "projectOwner": "all-contributors", + "repoHost": "https://github.com", + "repoType": "github", + "skipCi": true, + "types": { + "custom": { + "description": "A custom contribution type.", + "link": "[<%= symbol %>](<%= url %> \"<%= description %>\"),", + "symbol": "🔭" + } + } +} diff --git a/src/negative_test/all-contributors/invalid-contribution.json b/src/test/all-contributors/custom-contribution-type.json similarity index 95% rename from src/negative_test/all-contributors/invalid-contribution.json rename to src/test/all-contributors/custom-contribution-type.json index fc90603f281..91759432134 100644 --- a/src/negative_test/all-contributors/invalid-contribution.json +++ b/src/test/all-contributors/custom-contribution-type.json @@ -5,7 +5,7 @@ "contributors": [ { "avatar_url": "https://avatars1.githubusercontent.com/u/26386270?v=4", - "contributions": ["code", "doc", "jokes"], + "contributions": ["code", "doc", "custom"], "login": "EndBug", "name": "Federico Grandi", "profile": "https://github.com/EndBug"