gitflow-release-notes

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

gitflow-release-notes

godoc Go Report Card

Automatically generate release notes based on pull requests, and push them to Github or Slack.

Background

In order for this tool to work properly, you must follow the GitFlow workflow, at least to some degree. If you're not familiar with the GitFlow workflow, you could have a look at these great articles, giving some great insight:

GitFlow is a way of structuring pull requests and branches, that intends to simplify the branching workflow in a larger project. This tool assumes you merge branches as PRs with the following setup:

Static branhes:
  • master - Where tags are pushed - represents the stable environment
  • develop - Where new additions and non-urgent fixes are added
Branches based from develop
  • feature/[name] - Branches with this prefix contains features (merge to develop)
  • bugfix/[name] - Branches with this prefix contains bug fixes (merge to develop)
  • release/[name] - Branches with this prefix are created to prepare an upcoming release (merge to develop and master)
Branches based from master
  • hotfix/[name] - Branches with this prefix are urgent to get to the stable environment to fix bugs (merge to develop and master)

Installation

go get -u franzwilhelm/gitflow-release-notes
go install $GOPATH/src/github.com/franzwilhelm/gitflow-release-notes

Usage

In order to authenticate with the Github API, make sure to generate a personal access token on Github. For the tool to work correctly, it needs the following permissions:

  • repo - Full control of private repositories
  • repo:status - Access commit status
  • repo_deployment - Access deployment status
  • public_repo - Access public repositories
  • repo:invite - Access repository invitations
  • read:gpg_key - Read user gpg keys

Then export it as an environment variable GITHUB_ACCESS_TOKEN, before running the tool.

To use the tool and get available commands, simply run gitflow-release-notes -h.

Example

This example generates changelog for release v1.2.3 and pushes is to Github, and to a slack channel.

gitflow-release-notes changelog v1.2.3 \
  --repository franzwilhelm/gitflow-release-notes \
  --push \ # Push to Github
  --slack-channel $slack_channel \
  --slack-icon $slack_icon \
  --slack-webhook $slack_webhook_url

Features

gitflow-release-notes already has some great built-in features, and there are more to come!

  • Automatic grouping of changelogs by branch name (feature/bugfix/hotfix/other)
  • Write beautiful changelogs for a single or multiple tags to disk
  • Push or overwrite release notes directly to Github
  • Push structured release notes to a Slack channel
  • Possible to use a config file instead of flags
  • Possible to customize markdown formatting
  • Use commit messages as backup when no PRs are found for a release

Contributing

If you would like to contribute, all pull requests are welcome! This repo is currently not GitFlow enabled, so just open PRs directly to master, and I'll drop a review!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL