All contribution types supported by All Contributors.
npm i @all-contributors/contribution-typesimport {
contributionTypes,
createContributionLink,
isContributionTypeName,
} from '@all-contributors/contribution-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'); // falseThe 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.
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md.
Thanks! π£
Jim Madge π§ |
Josh Goldberg β¨ π» π π π€ π π§ π π§ |
michael faith π§ π§ π€ π π π» |