Skip to content

dgarlitt/release_notes_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

Release Notes Generator


This is a python based library for generating release notes (in markdown) from a project's commit log (for a given tag) and pushing the release notes to a wiki repository. A tag is compared to the previous tag (if one exists) to get a list of commits. These commits are then parsed to extract ticket/issue numbers, messages and author info to be used for the generated release notes. The cleaner and more relevant the commit messages are, the more useful the generated release notes become. This encourages developers to provide clean, meaningful commit history that summarize their work and associates it with an issue before merging it into a mainline branch.

Setup


  • Clone the project you want to generate release notes from
  • Clone the wiki where you want to post release notes to
  • Clone and cd into this project git clone git@github.com:dgarlitt/release_notes_generator.git && cd $_
  • Edit the props.json file
    • Paths specified in this file can be absolute or relative and can optionally have a slash on the end
    • Update any regex patterns to fit your project needs

Usage


The main.py script is the main script that triggers the generation of release notes. There is a props.json file in the same directory that can be used to configure the script to fit an individual's development environment. The main script can take one of two arguments.

To generate release notes for all release tags past to present, it can be run as:

./main.py all

To generate release notes for an individual release tag, run:

./main.py 1.2.3.4

where 1.2.3.4 would be substituted for an individual release number.

Each time release notes are generated, the index file is updated to contain a link to the newly created release notes.

After the release notes are generated, the script will automatically add, commit and push the changes to the wiki.

Release notes are derived from the release tags in your git repository. It is assumed that release tags in your project contain the release's version number. A regex pattern can be specified to recognize your version numbers. Also, a prefix and/or a suffix can be set to identify release tags.

For instance, if the prefix is project-v and the suffix is -release and the version number pattern is \d.\.\d\.\d\.\d, then the generator will find all tags matching the pattern:

project-v\d.\.\d\.\d\.\d-release

Therefore, you can conclude that the following tag names will match the pattern:

project-v1.2.3.4-release

project-v2.3.4.5-release

project-v3.4.5.6-release

Running the unit tests


You will need the following python libraries installed to run the tests:

nose
mock
coverage

These can be installed either through easy_install or pip. If you are using pip, then simply run the following command from the same directory as main.py:

pip install -r requirements.txt

To run the tests, cd into the scripts/release_notes_gen directory and then run:

nosetests --nocapture

To see a coverage report, run:

nosetests --nocapture --with-coverage --cover-erase --cover-package=lib

About

Generate release notes for Git tags from commit history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages