A plugin for danger.systems that obsessive-compulsively lints your project’s CHANGELOG.md
.
It can make sure, for example, that changes are attributed properly, have a valid version number, a date in the ISO8601 format, balanced parenthesis and brackets, and that they’re always terminated with a period.
- What’s a correctly formatted CHANGELOG file?
- Installation
- Usage
- Configuration
- Checks
- Contributing
- Copyright
By design, danger-changelog
is quite strict with what it allows as a valid changelog file, using the Intridea style, used by this library itself. It also supports the Keep a Changelog format.
Add danger-changelog
to your Gemfile.
gem 'danger-changelog', '~> 0.6.0'
Call changelog.check!
from your Dangerfile
. Make a pull request and see this plugin in action.
Methods and attributes from this plugin are available in your Dangerfile
under the changelog
namespace.
The following options and checks are supported.
Set the CHANGELOG file name, defaults to CHANGELOG.md
.
changelog.filename = 'CHANGES.md'
Set the format of the CHANGELOG file.
changelog.format = :keep_a_changelog
Available formats are Intridea (default) and Keep a Changelog.
Customize the * Your contribution here.
line. Set the value to nil
to stop checking for one.
changelog.placeholder_line = "* Your change here.\n"
Ignore additions and changes with a certain name or expression, default is to ignore README.md
changes.
For example, ignore UPGRADING.md
and all .txt
files.
changelog.ignore_files = ['README.md', 'UPGRADING.md', /\.txt$/]
Invoke check methods.
Run all checks with defaults, including have_you_updated_changelog?
and is_changelog_format_correct?
.
Checks whether you have updated CHANGELOG.md.
Checks whether the CHANGELOG format is correct.
See CONTRIBUTING.
Copyright (c) Daniel Doubrovkine, 2016-2019
MIT License, see LICENSE for details.