The contribution types supported by All Contributors, as data. ๐ฃ
npm i all-contributors-types
import { contributionTypes, createContributionLink, isContributionTypeName, } from 'all-contributors-types'; contributionTypes.bug; // { description: "Bug reports", link: "issues", symbol: "๐" } createContributionLink('bug', { login: 'JoshuaKGoldberg', projectName: 'contribution-types', projectOwner: 'all-contributors', }); // "https://github.com/all-contributors/contribution-types/issues?q=author%3AJoshuaKGoldberg" isContributionTypeName('bug'); // true isContributionTypeName('other'); // false
The data and links are kept in sync with @all-contributors/cli's emoji key.
Each contribution type, keyed by name, with:
description: human-readable description, such as"Bug reports"link(optional): which kind of repository page it links to:"commits","issues", or"reviews"symbol: emoji, such as"๐"
The ContributionTypeName type is a union of all contribution type names.
Creates the URL a contribution links to in an All Contributors README table, the same as all-contributors generate.
Contribution types without a link get a #type-login anchor.
Options:
login(optional): username of the contributorprojectName: name of the repositoryprojectOwner: owner of the repositoryrepoHost(optional): base URL of the repository host, if not the default forrepoTyperepoType(optional):"github"(default) or"gitlab"
Type guard for whether a string is a known ContributionTypeName.
all-contributors/cli#295 Expose contribution-types in separate package tracks a first-party package exposing these utilities and types. In the meantime, this package approximates what all-contributors does.
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md.
Thanks! ๐ฃ
Jim Madge ๐ง |
Josh Goldberg โจ ๐ป ๐ ๐ ๐ค ๐ ๐ง ๐ ๐ง |
michael faith ๐ง ๐ง ๐ค ๐ ๐ ๐ป |