GPlan started out as a simple ruby script that parsed out ticket numbers from any git log of the current branch compared to its production branch and puts together release notes
As of right now, it does this by combining Github Pull Requests, Github Issues and Planbox Stories.
gem install gplan
This will be different on every OS, but for OSX, I did this...
sudo echo "
#for planbox
export PLANBOX_EMAIL=<EMAIL_ADDRESS>
export PLANBOX_TOKEN=<PASSWORD>
export GITHUB_USERNAME=<GITHUB_USERNAME>
export GITHUB_TOKEN=<GITHUB_TOKEN>" >> /etc/profile
For any project you want to use this for, you will need to tell gplan what repository/branch to compare your current branch to. To do this, create a .gplan
file in the repository's root with <repo_name>/<branch_name>
. If one isn't set, a default of production/master
is used.
echo "origin/master" > .gplan
OR
pass in a param that overrides this configuration. ie.. gplan 98ih2h3583
- cd to git project
- checkout the branch that you wish to get release notes for
- run
gplan
- you should now get a list of the pattern
PR:TITLE:ISSUES:MILESTONE
...
---- Matched Planbox Stories ----
...
ID:STATUS:TITLE:PROJECT_NAME:PROJECT_ALIAS:PR:TITLE
Note: the first table is unmatched PRs and are github pull requests that doesn't have a matching planbox story
To ouput release notes as HTML
gplan -h
They will look something like this...
Gplan will detect dependencies based on a Github PR. It will find it using this logic
- Does the PR contain a markup header (ie. some number of #'s) followed by some variation of the word dependency?
example:
## Dependencies
you must run a rake task
Note that this will include everything from the '##' to the next '##' or the end of the PR body
- Does the PR contain a line that starts with "depends on"? then that line will be included
example: All of these would get picked up as dependencies
Depend on #123
Depends on #123
Dependent on #123
- Does the PR contain the label "Has Dependency"?
bundle
To run tests:
rake test
or just
rake