0.04
Low commit activity in last 3 years
There's a lot of open issues
A long-lived project that still receives updates
A danger.systems plugin that is OCD about your CHANGELOG.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Danger-Changelog

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.

Gem Version Build Status

Table of Contents

  • What’s a correctly formatted CHANGELOG file?
  • Installation
  • Usage
  • Configuration
    • changelog.filename
    • changelog.format
    • changelog.placeholder_line
    • changelog.ignore_files
  • Checks
    • changelog.check!
      • changelog.have_you_updated_changelog?
      • changelog.is_changelog_format_correct?
  • Contributing
  • Copyright

What's a correctly formatted CHANGELOG file?

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.

Installation

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.

Usage

Methods and attributes from this plugin are available in your Dangerfile under the changelog namespace.

Configuration

The following options and checks are supported.

changelog.filename

Set the CHANGELOG file name, defaults to CHANGELOG.md.

changelog.filename = 'CHANGES.md'

changelog.format

Set the format of the CHANGELOG file.

changelog.format = :keep_a_changelog

Available formats are Intridea (default) and Keep a Changelog.

changelog.placeholder_line

Customize the * Your contribution here. line. Set the value to nil to stop checking for one.

changelog.placeholder_line = "* Your change here.\n"

changelog.ignore_files

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$/]

Checks

Invoke check methods.

changelog.check!

Run all checks with defaults, including have_you_updated_changelog? and is_changelog_format_correct?.

changelog.have_you_updated_changelog?

Checks whether you have updated CHANGELOG.md.

changelog.is_changelog_format_correct?

Checks whether the CHANGELOG format is correct.

Contributing

See CONTRIBUTING.

Copyright

Copyright (c) Daniel Doubrovkine, 2016-2019

MIT License, see LICENSE for details.