Skip to content

About

The contribution types supported by All Contributors, as data. πŸ”£

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

All Contributors: Contribution Types

All contribution types supported by All Contributors.

πŸ‘ͺ All Contributors: 3 πŸ§ͺ Coverage πŸ“ License: MIT πŸ“¦ npm version

Usage

npm i @all-contributors/contribution-types
import {
  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'); // false

The data and links are kept in sync with @all-contributors/cli's emoji key.

contributionTypes

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.

createContributionLink

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 contributor
  • projectName: name of the repository
  • projectOwner: owner of the repository
  • repoHost (optional): base URL of the repository host, if not the default for repoType
  • repoType (optional): "github" (default) or "gitlab"

isContributionTypeName

Type guard for whether a string is a known ContributionTypeName.

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! πŸ”£

Contributors

Jim Madge
Jim Madge

🚧
Josh Goldberg ✨
Josh Goldberg ✨

πŸ’» πŸ–‹ πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† πŸ”§
michael faith
michael faith

🚧 πŸ”§ πŸ€” πŸ“– πŸš‡ πŸ’» ⚠️

About

The contribution types supported by All Contributors, as data. πŸ”£

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages