Giter Site home page Giter Site logo

mt-changelog's Introduction

mt-changelog

Creates simple changelogs from your git commits in markdown with links when viewed from github.

  Usage: changelog [options]

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -t, --title [title]      the title of the changelog (should probably be the new tag)
    -m, --message [message]  regex to match commit messages to be included in the changelog
    -o, --out [path]         file to write changelog to
    -s, --stdout             will prevent writing a file and print results to stdout

installation

$ npm install mt-changelog

Example

Command line

# ensure you have a semver tag in the past, and then...
$ changelog -t v2.1.0

Node

var changelog = require('mt-changelog');

options = {
  stdout: false,
  out: 'CHANGELOG.md',
  title: 'v1.2.3',
  message: /\[(added|removed|changed|fixed)\]/,
  formatter: require('mt-changelog/lib/formatters/basic')
};

// Returns a Promise
changelog(options)
  .catch(function(err) {
    // error handling
  });

Output:

The commit hash becomes a link to the commit when viewed on github.

v2.1.0 - Fri, 28 Mar 2014 05:54:33 GMT
--------------------------------------

[1685ade](../../1685ade) [added] some new stuff
[02aa80f](../../02aa80f) [fixed] busted things


v2.0.10 - Fri, 21 Mar 2014 02:31:10 GMT
---------------------------------------

[1685ade](../../1685ade) [removed] terrible apis
[02aa80f](../../02aa80f) [changed] default options for stuff

By default, it will look for commit messages with subjects that match:

  • [added] ...
  • [changed] ...
  • [fixed] ...
  • [removed] ...

But you can supply a regex with -m [message], for example:

$ changelog -m '\[a\]|\[c\]|[\f\]|\[r\]'

mt-changelog's People

Contributors

alexkval avatar jquense avatar mtscout6 avatar ryanflorence avatar

Watchers

 avatar  avatar  avatar

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.