Parses co-authors from Git/GitHub-style commit messages and issue bodies. ✍️
npm i description-to-co-authorsPass 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 <[email protected]>
`);[
{
"username": "DirectUsername"
},
{
"email": "[email protected]",
"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.
See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md.
Thanks! ✍
Josh Goldberg 🚧 💻 🖋 📖 🤔 🚇 📆 🔧 |
💝 This package was templated with
create-typescript-appusing the Bingo framework.