Parses co-authors from Git/GitHub-style commit messages and issue bodies. ✍️
npm install description-to-co-authorsParses co-authors from Git/GitHub-style commit messages and issue bodies. ✍️
``shell`
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.co-authored-by:
It will collect data from each case-insensitive match.email
Data may include , name, and/or username:
`ts
import { descriptionToCoAuthors } from "description-to-co-authors";
descriptionToCoAuthors(
co-authored-by: @DirectUsername
Co-authored-by: Josh Goldberg );`
`json`
[
{
"username": "DirectUsername"
},
{
"email": "github@joshuakgoldberg.com",
"name": "Josh Goldberg"
}
]
> [!NOTE]
> Proper Co-authored-by attributions should use the _name _ format, not @username.@username` extension is only there as a friendly compatibility layer for GitHub users who don't allow seeing their email.
> The
> Please don't use it unless you absolutely need to.
Josh Goldberg 🚧 |
> 💙 This package was templated with description-to-co-authors.