Name: pr-log
Owner: Storybook
Description: :page_facing_up: Changelog generator based on GitHub Pull Requests
Forked from: lo1tuma/pr-log
Created: 2017-05-20 13:51:07.0
Updated: 2018-01-30 01:03:01.0
Pushed: 2018-04-20 18:28:38.0
Size: 127
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Changelog generator based on GitHub Pull Requests
The main features:
CHANGELOG.md
from merged GitHub pull requests since the last tag. This works byCHANGELOG.md
existed, it will create the file else it will write prepending to itpr-log --help
Error: version-number not specified
Error: Local git master branch is 0 commits ahead and 2 commits behind of origin/master
Error: Local copy is not clean
Simply run this to install pr-log
:
install pr-log
You have to follow these steps to use pr-log
without problems.
The default categories for the changelog are set in lib/validLabels.js
. The following categories are predefined (<label name>: <human friendly name>
):
'Bug Fixes',
ade: 'Dependency Upgrades',
mentation: 'Documentation',
ure: 'Features',
ncement: 'Enhancements',
d: 'Build-Related',
king: 'Breaking Changes'
However, you can also create a custom mapping by adding a pr-log.validLabels
section to your package.json
. For example:
.
r-log": {
"validLabels": {
"core": "Core features",
"addon": "Addons"
}
.
To use pr-log
your GitHub project needs some small configuration:
Issues -> Labels -> New Label
)2.4.7
)As pr-log
reads repository information from your project you have to add the repository
information in your package.json
ository": {
"type": "git",
"url": "https://github.com/<your username>/<your repository name>.git"
To create or update your changelog run
ple:
n the following setup:
GitHub a tag named `2.4.7` exists that is behind `master`
pull request (#13) was created since the last tag that has the label `breaking`
pull request (#22) was created since the last tag that has the label `documentation`
log 2.4.7` creates a changelog with the following example content:
The --sloppy
option defaults to false. When set, it allows pr-log
to generate a changelog even when you are not on the master
branch. This should not be used in production!
If you want your changelog to be complete and clean you have to follow these rules:
breaking
(which will later result in this feature being listed under the Breaking Changes
point in your changelog)Many projects have problems with their changelogs. Most of them try one of the following ways
Other challenges for good changelogs:
This project was initially started to solve these problems for mongobird
.
CHANGELOG.md
After working for some time with the tool and having e.g. two releases, the file content could look like this:
.4.7 (January 20, 2015)
Breaking Changes
e new (backwards incompatible) version of module XYZ (#13)
Documentation
x some spelling mistakes in documentation. (#22)
.1.0 (November 3, 2014)
Feature
d fancy feature (#2)