CLI application for getting information out of GitHub, mainly for running a sprint and generating a burn down and creating changelogs.
CLI application for retrieving data from GitHub
Usage:
hagen [command]
Available Commands:
burndown Provide a burndown table for a project
help Help about any command
issues List issues given the search criteria. Default query is to list issues where the author is ${GITHUB_OWNER}
projects List the projects. Default query is to list project for ${GITHUB_OWNER}
repos List the repositories based on a query. Default query is to list repos by ${GITHUB_OWNER}
Flags:
--config string config file (default is $HOME/.benmatselby/hagen.yaml)
-h, --help help for hagen
Use "hagen [command] --help" for more information about a command.
- Go version 1.21+
- You will need require a PAT from GitHub.
There are two aspects to configuring hagen
.
In order to connect to GitHub hagen
requires three environment variables.
export GITHUB_OWNER="" # This is likely to be your personal GitHub username
export GITHUB_ORG="" # This is if you are linked to a GitHub org
export GITHUB_TOKEN="" # Your PAT
The token can be generated by reading this article. Typically the GITHUB_OWNER
will be your username.
hagen
tries to save on typing, so you can define some queries in a configuration file.
templates:
sprint:
query: "state:open project:acme/14"
count: 200
open-bugs:
query: "repo:benmatselby/donny state:open"
count: 50
To understand how to write the query
section, follow this article.
You can install this application a few ways:
Installation via Docker
Other than requiring docker to be installed, there are no other requirements to run the application this way.
$ docker run \
--rm \
-t \
-eGITHUB_ORG \
-eGITHUB_OWNER \
-eGITHUB_TOKEN \
-v "${HOME}/.benmatselby":/root/.benmatselby \
benmatselby/hagen:latest [command]
The latest
tag mentioned above can be changed to a released version. For all releases, see here. An example would then be: