Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flo-sch/semantic-release-contributors
semantic-release plugin to automatically update contributors list from git history
https://github.com/flo-sch/semantic-release-contributors
authoring contributors release semantic-release semantic-release-plugin
Last synced: 2 months ago
JSON representation
semantic-release plugin to automatically update contributors list from git history
- Host: GitHub
- URL: https://github.com/flo-sch/semantic-release-contributors
- Owner: flo-sch
- License: mit
- Created: 2019-09-01T10:21:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T09:43:51.000Z (over 4 years ago)
- Last Synced: 2024-09-22T08:16:28.489Z (3 months ago)
- Topics: authoring, contributors, release, semantic-release, semantic-release-plugin
- Language: JavaScript
- Size: 67.4 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
📦🤖 semantic-release-contributors
semantic-release
plugin to automatically update contributors list based on commits history
------------------
| Step | Description |
|----------------|-----------------------------------------------------------------------------------------------------|
| `prepare` | Determine the contributors list by analyzing commits history. |## Install
```bash
npm install semantic-release-contributors -D
```## How does it work
Whenener someone commit to the project, his/her name will be appended
to the [contributors list of your package.json](https://docs.npmjs.com/files/package.json#people-fields-author-contributors) file.If `Paul Smith` commits to a project with the following set-up:
```json5
{
"name": "your-project",
"author": "Barney Rubble ",
"contributors": [
"John Doe (https://johndoe.com)"
]
}
```The `package.json` file would then be updated to:
```json5
{
"name": "your-project",
"author": "Barney Rubble ",
"contributors": [
"John Doe (https://johndoe.com)",
"Paul Smith "
]
}
```**NOTE**: this package internally deserialize the contributors to
objects (name, email, url) and make sure duplicated emails are removed.
Contributors objects are then potentially re-serialized before being written
to the package file (unless you opt for a different format)## Usage
The plugin can be configured in the [**semantic-release** configuration file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#configuration):
**IMPORTANT**: since this plugin acts on semantic-release's "prepare" step
and do not commit the updated package.json file itself,
it *requires* to be placed *before* "@semantic-release/git".```json5
{
"plugins": [
// important: insert it before @semantic-release/git
["semantic-release-contributors", {
"format": "string",
"pkgRoot": "."
}],
// ...
"@semantic-release/git"
// ...
]
}
```With this example:
* the contributors will be stringified to `name `
* the package file containing the contributors will be read
then updated in the current directory## Configuration
### Options
| Option | Description | Default |
|-----------|-----------------------------------------------------------------------------------------------------------------|----------|
| `format` | `string` or `object`. It defines which format will the contributors be written with to the `package.json` file. | `string` |
| `pkgRoot` | Directory path to publish. | `.` |## Similar or related projects
* [parse-author](https://www.npmjs.com/package/parse-author)
* [stringify-author](https://www.npmjs.com/package/stringify-author)