github-changelog

module
v0.0.0-...-53a0680 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0

README

Build Status

Github changelog generator

This command line utility generates changelog for a Github repository. The changelog generation is fully customizable via golang templates.

Example

Github requires OAUTH token to access its API. Generate a token here.

The executable can be downloaded from Github releases page.

docker run --rm  pavolloffay/gch:latest --oauth-token <github-oauth-token>
# the binary is in /app folder in the docker image
docker run --rm  -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token <github-oauth-token> --template /app/templates/chrono-list.md

Examples can be found in examples directory.

Templates

The binary contains predefined templates directly in the executable, however --template flag can be used to supply any template.

  • chrono-list.md - Chronologically order list of all pull requests split into tags.
  • all-labels.md - Pull requests are split into labels, unlabeled commits are in a separate category.
  • default-labels.md - Pull requests are split into bugs and enhancements.

The templates splitting pull requests into categories require proper labeling.

Writing a custom template

Template uses golang template language to render the data. The default examples can be found in templates directory and these are also compiled into the binary. The object passed to the template is TemplateData defined in pkg/templates/model.go. The struct uses objects from go-github which are exposed in the templates.

go run ./cmd/main.go --template <your-template>

Develop

make build
./buld/gch

License

Apache 2.0 License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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