description-to-co-authors
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Description to Co Authors

Parses co-authors from Git/GitHub-style commit messages and issue bodies. ✍️

👪 All Contributors: 1 🤝 Code of Conduct: Kept 🧪 Coverage 📝 License: MIT 📦 npm version 💪 TypeScript: Strict Style: Prettier

Usage

npm i description-to-co-authors

Pass any variant of Git/GitHub-style commit message or issue body string to this package's exported descriptionToCoAuthors. It will collect data from each case-insensitive co-authored-by: match. Data may include email, name, and/or username:

import { descriptionToCoAuthors } from "description-to-co-authors";

descriptionToCoAuthors(`
co-authored-by: @DirectUsername
Co-authored-by: Josh Goldberg <github@joshuakgoldberg.com>
`);
[
	{
		"username": "DirectUsername"
	},
	{
		"email": "github@joshuakgoldberg.com",
		"name": "Josh Goldberg"
	}
]

[!NOTE] Proper Co-authored-by attributions should use the name <email> format, not @username. The @username extension is only there as a friendly compatibility layer for GitHub users who don't allow seeing their email. Please don't use it unless you absolutely need to.

Contributors

Josh Goldberg
Josh Goldberg

🚧

💙 This package was templated with description-to-co-authors.

Readme

Keywords

none

Package Sidebar

Install

npm i description-to-co-authors

Weekly Downloads

844

Version

0.3.0

License

MIT

Unpacked Size

9.57 kB

Total Files

6

Last publish

Collaborators

  • joshuakgoldberg