Giter Club home page Giter Club logo

github-release-notes's Introduction

Github Release Notes

npm version js-standard-style Build Status

Node module that generates release notes based on commit messages or closed issues between tags. It also can create a full changelog or add the latest release notes to the existing changelog file.

If you want to include it in a task, you can use grunt-github-release-notes

Installation

Install github-release-notes via npm:

npm install github-release-notes -g

Usage

gren can be ran through the terminal, but before you can use it, you need to set up a couple of things.

Github Informations

gren by default looks for your local git configuration to get the repo informations. This means you can run the command directly from the git repo folder.

Otherwise, you can run it from wherever and specify a different repo as target, with:

gren --username=[username] --repo=[repo name]

Token

To work, gren needs a github token (that can be easily generated following this link). You only need "repo" scope.

Once generated, you can run the gren command with the token as variable:

gren --token=your_token_here

Or you can add it to your ~/.bash_profile or ~/.zshrc) as follows:

export GREN_GITHUB_TOKEN=your_token_here

And you're ready to use it! Just run this command in your terminal:

gren

The module will look for the last tag, get all the issues closed in the time between that tag and the one before, and it will build release notes and draft the new release!

Options

Following the options for the module:

  • --action=release|changelog The gren action to run. Default: release (see details below for changelog generator)
  • --tags=0.1.0|0.2.0,0.1.0 A specific tag or the range of tags to build the release notes from.
  • --time-wrap=latest|history The release notes you want to include in the changelog. Default: latest Only applicable to the changelog action
  • --changelog-filename=CHANGELOG.md The name of the changelog file. Default: CHANGELOG.md
  • --data-source=issues|commits The informations you want to use to build release notes. Default: issues
  • --draft=true|false To set the release as a draft. Default: false
  • --prerelease=true|false To set the release as a prerelease. Default: false
  • --prefix=v Add a prefix to the tag version e.g. v1.0.1. Default: null
  • --include-messages=merges|commits|all used to filter the messages added to the release notes. Default: commits
  • --override=true|false Override the release notes if existing. Default: false

Examples

The ways to use gren are various.

Simple

The simple way, just looks for the last tag, gets all the issues closed between that tag and the one before and creates the new release with the generated body.

gren

Commit messages

Adding the flag --data-source=commits will change the source of the release notes to be the commit messages.

gren --data-source=commits

Release specific tags

The flag --tags accepts one or two tags. If you only give one tag, it will get the issues (or commit messages) between that tag and the one before. If you give two tags it will generate the release notes with the issues (or commit messages) between those two tag dates.

gren --tags=2.0.0,1.0.0

Override an existing release

If you trying to create an existing release, gren will throw an error "0.3.0 is a release, use --override flag to override an existing release! If you want then to override, simple use:

gren --override --tags=0.3.0

Changelog Generator

gren can also update generate the changelog.

The following command, will generate the release notes for the latest release, and add it to an existing file or create it in the same directory where you run the command.

gren --action=changelog

The generated release notes will be added at the top of the file, and will look like this:

Changelog

v0.4.3 (02/03/2016)

[bug] This is a issue name #123

Generate a full changelog

If tou want to generate the whole changelog, you need to use the --time-wrap=history. This will generate a changelog based on issues (or on commit messages if the --data-source=commits is present).

If you want to override the existing changelog, use --override.

The usage would then be:

gren --time-wrap=history --override

To see a full example of the changelog here CHANGELOG.md

github-release-notes's People

Contributors

alexcanessa avatar joaquincorcherofmp 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.