Coder Social home page Coder Social logo

danger-changelog's Introduction

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?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.