kolov / sbt-pantarhei   0.2.1

MIT License GitHub

sbt plugin building and publishing release notes from github pull requests

Scala versions: 2.10
sbt plugins: 0.13

Panta rhei CircleCI

Πάντα ῥεῖ - everything flows, and release notes can help keep track of what has changed.

Pantarhei is a sbt plugin that can create release notes from the
pull requests and git commits in github. Read more about Github's support for releases and release notes here.

Usage

Include the plugin:

addSbtPlugin("com.akolov" % "sbt-pantarhei" % "0.2.1")

This makes the following sbt tasks available:

Command Description
printNotesForLatestTag Prints release notes usable for the latest remote tag - that is, form all pull requests after the previous tag, if any, and before the last tag
pushNotesForLatestTag Creates or updates release notes for the latest remote tag on github. -Dpantarhei.release.name= will define a release name.
printNotesForNextTag Prints release notes from the pull requests after the latest tag. These notes will be usable for the next tag

The output of the print tasks is in markdown, ready to be copy/pasted as github release notes. Example:

$ sbt printNotesForLatest
Preparing release notes from pull requests before tag 0.0.1

[PR #2](https://github.com/kolov/sbt-pantarhei/pull/2) Config token
* [autoPlugin, credentials](https://github.com/kolov/sbt-pantarhei/commit/449a89324b3293db10dcade85a89ed9849b94548)
* [github token from credentials](https://github.com/kolov/sbt-pantarhei/commit/d990f551fcc2f23f53a677741bd162dd509277f0)

[PR #1](https://github.com/kolov/sbt-pantarhei/pull/1) test PR to use for retreiving PRs
* [parses github remote url](https://github.com/kolov/sbt-pantarhei/commit/e1e35f924ae7b242c92670fd0676063fe7b96423)


$ sbt printNotesAfterLatest 
Preparing release notes from pull requests after tag 0.0.1
No pull requests were found since last tag

To access the Github API, a an access token is needed. It must be defined as sbt Credentials, with realm=github and password={token}. The plugin will always try ~/.github/credentials, if no good credantials were found. Sample content:

realm=Github
password=... the real token here ...
user=whatever
host=whatever

Hints for use

To get sensible release notes, provide sensible Pull Request titles and commit messages. Consider squashing your commits.

You can install this plugin as a global plugin to avoid configuring the Github access token for every project.

Development

  • publish: sbt publishSigned
  • test sbt scripted