--- title: Create software releases keywords: fastai sidebar: home_sidebar summary: "API for auto-generated tagged releases, and release notes (from GitHub issues)" description: "API for auto-generated tagged releases, and release notes (from GitHub issues)" nb_path: "00_core.ipynb" ---
To create a markdown changelog, first create a FastRelease
object, optionally passing a mapping from GitHub labels to markdown titles. Put your github token in a file named token
at the root of your repo. FastRelease
attempts to fetch values for arguments from the following locations if not supplied:
user
in settings.ini
. This is the owner name of the repository on GitHub. For example for the repo fastai/fastcore
the owner would be fastai
.lib_name
in settings.ini
. This is the name of the repository on GitHub. For example for the repo fastai/fastcore
the owner would be fastcore
.token
at the root of your repo. Creating a token is discussed in the setup section.label_groups
in settings.ini
, which is a JSON string. This is a mapping from label names to titles in your release notes. If not specified, this defaults to:{"breaking": "Breaking Changes", "enhancement":"New Features", "bug":"Bugs Squashed"}
rel = FastRelease()
All relevant pull requests and issues are fetched from the GitHub API, and are categorized according to a user-supplied mapping from labels to markdown headings.
This uses the version information from your settings.ini
.
test_eq(bump_version('0.1.1' ), '0.1.2')
test_eq(bump_version('0.1.1', 1), '0.2.0')