All Projects → aldrin → git-changelog

aldrin / git-changelog

Licence: MIT license
Categorized change logs from git messages

Programming Languages

rust
11053 projects
shell
77523 projects
Handlebars
879 projects

Projects that are alternatives of or similar to git-changelog

next-release
Next Release is a release note management platform that automates your release notes in 3 clicks.
Stars: ✭ 18 (-10%)
Mutual labels:  changelog, changelog-generator
releasezri
Meaningful and minimalist release notes for developers
Stars: ✭ 25 (+25%)
Mutual labels:  changelog, changelog-generator
attribution
Generate changelogs from commit tags and shortlogs
Stars: ✭ 20 (+0%)
Mutual labels:  changelog, changelog-generator
bump-everywhere
🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (+20%)
Mutual labels:  changelog, changelog-generator
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (-10%)
Mutual labels:  changelog, changelog-generator
Github Changelog Generator
Automatically generate change log from your tags, issues, labels and pull requests on GitHub.
Stars: ✭ 6,631 (+33055%)
Mutual labels:  changelog, changelog-generator
news-fragments
An easy way to create your changelog file
Stars: ✭ 31 (+55%)
Mutual labels:  changelog, changelog-generator
commitlog
Generate Changelogs from Commits (CLI)
Stars: ✭ 63 (+215%)
Mutual labels:  changelog, changelog-generator
changie
Automated changelog tool for preparing releases with lots of customization options
Stars: ✭ 180 (+800%)
Mutual labels:  changelog, changelog-generator
gtbump
git tag bump: A simple utility to bump and manage git semantic version tags and generate Markdown changelogs.
Stars: ✭ 15 (-25%)
Mutual labels:  changelog, changelog-generator
yaclt
Yet Another Change Log Tool
Stars: ✭ 24 (+20%)
Mutual labels:  changelog, changelog-generator
Fastlane Plugin Changelog
Automate changes to your project CHANGELOG.md
Stars: ✭ 176 (+780%)
Mutual labels:  changelog
Appupdater
A library that checks for your apps' updates on Google Play, GitHub, Amazon, F-Droid or your own server. API 9+ required.
Stars: ✭ 1,793 (+8865%)
Mutual labels:  changelog
Chyle
Changelog generator : use a git repository and various data sources and publish the result on external services
Stars: ✭ 137 (+585%)
Mutual labels:  changelog
Gh Release
Create a github release for a node package.
Stars: ✭ 132 (+560%)
Mutual labels:  changelog
Gitmoji Changelog
A changelog generator for gitmoji 😜
Stars: ✭ 250 (+1150%)
Mutual labels:  changelog
Semantic Release
📦🚀 Fully automated version management and package publishing
Stars: ✭ 14,364 (+71720%)
Mutual labels:  changelog
Release Notes Generator
📋 semantic-release plugin to generate changelog content with conventional-changelog
Stars: ✭ 123 (+515%)
Mutual labels:  changelog
Git Changelog Lib
Library for parsing and generating a changelog, or releasenotes, from a GIT repository
Stars: ✭ 117 (+485%)
Mutual labels:  changelog
Git Chglog
CHANGELOG generator implemented in Go (Golang).
Stars: ✭ 1,895 (+9375%)
Mutual labels:  changelog

Build Status Build status Crates.io GitHub release codecov

git-changelog is a tool to generate change logs (a.k.a release notes) that are typically distributed at project release milestones. Unlike other tools that do the same, this one does not require you to follow any particular git workflow conventions. All it assumes is that you'll pick a few keywords (or use the built-in ones) to annotate lines in your commit messages. Concretely, a commit like this generates an output like this.

When you wish to record a user visible change (e.g. new feature, bug fix, breaking change, etc.) you write a normal commit message and annotate some lines in it with your chosen keywords. The annotated lines are used at report generation time to organize changes into categories and scopes. The organized changes are then rendered as a pretty and accurate change log.

Commit messages without tags are quietly ignored and you are free to tag as little or as much as you want.

Here's a quick demo:

asciicast

Motivation

Commit messages must always be meaningful and with a little extra effort we can automate the chore of generating meaningful change logs for users. As I finish up work on a change, I like to pause, consider what the change means to the end-user and reorganize the message a bit. If you follow the (easy) conventions described below and tag lines in your commit message appropriately, this tool will help you generate an accurate and presentable change log.

A little time spent, when the context and impact of the change is fresh in mind, saves a lot of time at release milestones.

Installation

The recommended way to install the tool is:

> cargo install git-changelog

This compiles the tool for your environment from the sources. If you just need the executables, see releases.

If you use a Mac with Homebrew, you can get the latest binaries with the following:

> brew tap aldrin/tap
> brew install git-changelog

Usage

Write your commits as you normally do (or should🙂). When it looks like a particular commit includes a change that the "user" may be interested in, tag its lines appropriately. Concretely, instead of writing this:

Add support for filtering responses

UI gets a bit cluttered when the response contains too many
items. Added a simple filtering scheme to reduce the result
set to a more relevant subset. Clients using v1.2 need to
upgrade to accomodate the new request parameter.

Write this:

Add support for filtering responses

- feature: UI gets a bit cluttered when the response
  contains too many items. Added a simple filtering scheme
  to reduce the result set to a more relevant subset.

- break: Clients using v1.2 need to upgrade to accommodate
  the new request parameter.

The two commit messages are almost the same but the latter tags user visible changes a bit more diligently. Eventually, this diligence helps the tool to identify lines, aggregate similar things (e.g. breaking changes) across commits, order them, and give you a report that you can share, as is, with users. Or, you can use the output as the starting draft, make editorial changes and then share it with users. Either way, it saves you some time.

You don't need to tag every commit (git commit -m is perfectly fine, where you think it is). You just need to tag the changes you want your users to know about.

The quality of the tool output depends on the quality of your input.

Generate reports

Once on PATH, the tool works like a usual git sub-command (e.g. like git log) and takes a revision range as input. It looks at all commits in the range and uses the keywords it finds in their messages to generate the report. Simple. 🙂

$ git changelog v0.1.1..v0.2.0

If you don't provide a revision range, <last-tag>..HEAD is used. If no tags are defined, just the last commit is picked.

$ git changelog -d
INFO: Reading file '/Users/aldrin/Code/git-changelog/.changelog.yml'
INFO: Using revision range 'v0.2.0..HEAD (15 commits)'
...

Note that using -d gives you some insight into the tool operations.

For more complex range selections you can use git log arguments as shown below:

$ git changelog -- --author aldrin --reverse --since "1 month ago"

Note the -- before you start the git log arguments.

Customization

Each project is different and you may want to customize the tags and output to suit your requirements.

Conventions: You can define change categories and scopes tags and titles relevant to your project. Add a .changelog.yml file to your repository root (or use the --config option). See the default configuration file for a starting example.

Templates: You can specify your own Handlebars template if the output doesn't work for you. Add a .changelog.hbs to your repository root or use the --template command line option. See the default template for a starting example and the library documentation for details on the input data-structure.

JSON: You can skip Markdown completely and ask for a JSON output with the --json flag.

Post Processors: You can add line post-processors to tweak the output. I use these to simplify adding links to bug-tracking systems. For example, the commit message can simply state the ticket number:

Fixes: JIRA-1234

Then, with a post-processor like the following in the configuration file:

output:
  post_processors:
    - {lookup: "JIRA-(?P<id>\\d+)", replace: "[JIRA-$id](https://jira.company.com/view/JIRA-$id)"}

the tool replaces it with:

Fixes: [JIRA-1234](https://jira.company.com/view/JIRA-1234)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].