Git Product home page Git Product logo

changelog-generator's Introduction

Changelog generator

Generates a CHANGELOG.md from git commit log

This tool does the following:

  • Fetches commits from git log since a specified last version
  • Parses them according to a specified format
  • Generates ( or writes to an existing ) CHANGELOG.md file with a specified new version

Usage

Usage: generate-changelog [options]

Options:
  --version    Show version number                                     [boolean]
  -u, --until  Last version of project
  -n, --new    New version to be written                              [required]
  -h, --help   Show help                                               [boolean]

Installation

Note This tool requires nodejs version >= 10.0

Clone this repository:

git clone [email protected]:Nimor111/changelog-generator.git

Create a generate-changelog shell command

npm link

Now you can create your changelog

# Write commits since v1.0.0 to a new v2.0.0
generate-changelog -u 1.0.0 -n 2.0.0

Commit format

Two types of commits are expected.

The first type are version commits which have the following format:

  • v1.0.0
  • Version 1.0.0
  • 1.0.0

The second type are follow a format based on the Angular JS commit conventions:

<tag>: <description>

<detailed description> ( optional, doesn't get written to changelog )

BREAKING CHANGES: <description>

Where tag can be any of the following:

  • feature
  • fix
  • test
  • refactor
  • style
  • docs

More TBA.

References

fetchCommitsUntilVersion(command, until)

Fetches commits from git log until it encounters a commit until ( in the version commit format specified above )

command is a shell command to fetch commits from the git log.

Returns a list of commits.

createChangelog()

Creates a CHANGELOG.md file and writes the initial changelog message to it. If the changelog file already exists, doesn't do anything.

writeCommits(newVersion, commits)

Writes commits tags and descriptions to the beginning of the changelog prefixed by newVersion ( after the initial message ) and before the version specified by the user.

changelog-generator's People

Contributors

georgi-bozhinov avatar

Watchers

 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.