Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/p-m-p/cz-conventional-changelog-coauthors
cz-conventional-changelog with additional co-authors prompt
https://github.com/p-m-p/cz-conventional-changelog-coauthors
co-authors commitizen conventional-changelog conventional-commits git
Last synced: 5 days ago
JSON representation
cz-conventional-changelog with additional co-authors prompt
- Host: GitHub
- URL: https://github.com/p-m-p/cz-conventional-changelog-coauthors
- Owner: p-m-p
- License: mit
- Created: 2023-06-23T15:13:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-01T18:35:54.000Z (4 months ago)
- Last Synced: 2024-10-08T06:19:06.391Z (about 1 month ago)
- Topics: co-authors, commitizen, conventional-changelog, conventional-commits, git
- Language: JavaScript
- Homepage:
- Size: 187 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cz-conventional-changelog-coauthors
[![npm version](https://img.shields.io/npm/v/cz-conventional-changelog-coauthors.svg?style=flat-square)](https://www.npmjs.org/package/cz-conventional-changelog-coauthors)
A simple wrapper around [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog) to provide an addition `Co-authored-by` prompt for teams that use pair/mob programming and wish to attribute additional authors to a commit.
## Installation
Make your repository [commitizen friendly](https://github.com/commitizen/cz-cli#making-your-repo-commitizen-friendly) using the commitizen cli.
```sh
# npm
commitizen init cz-conventional-changelog-coauthors --save-dev --save-exact# yarn
commitizen init cz-conventional-changelog-coauthors --yarn --dev --exact# pnpm
commitizen init cz-conventional-changelog-coauthors --pnpm --save-dev --save-exact
```## Configuration
### package.json
See [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog#configuration) for a full list of configuration options. Co-authors can be provided in the `defaultCoAuthors` option as list of raw strings or objects with name and email fields.
```json
{
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog-coauthors",
"defaultCoAuthors": [
"Joe Bloggs ",
{
"name": "Jane Doe",
"email": "[email protected]"
}
]
}
}
}
```You can also install and configure the adapter globally in `~/.czrc`
```json
{
"path": "cz-conventional-changelog-coauthors",
"defaultCoAuthors": [
{
"name": "Jane Doe",
"email": "[email protected]"
},
{
"name": "Joe Bloggs",
"email": "[email protected]"
}
]
}
```### Environment variable
As with the environment variables for [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog#environment-variables) the co-author list can be provideed in the `CZ_CO_AUTHORS` environment variable. The environment variable overrides the `defaultCoAuthors` configuration option and can be used to populate the author list dynamically.
```sh
export CZ_CO_AUTHORS = "Joe Bloggs , Jane Doe "
```