Package: changelog-gen
Changelog Generator - v0.8.1changelog-genis a CHANGELOG generator intended to be used in conjunction
withbumpversionto generate
changelogs and create release tags.Installationpipinstallchangelog-genor clone this repo and install with poetry.poetryinstallUsagechangelog-gencurrently only supports reading changes from arelease_notesfolder.Files in the folder should use the format{issue_number}.{type}.By default supported types are currentlyfixandfeat. Additional types can be configured
to map to these initial types.The contents of each file is used to populate the changelog file. If the type
ends with a!it denotes a breaking change has been made, this will lead to a
major release being suggested.$lsrelease_notes4.fix7.fix

$changelog-gen## v0.2.1### Bug fixes-Raiseerrorsfrominternalclasses,don'tuseclick.echo()[#4]-Updatechangeloglineformattoincludeissuenumberattheend.[#7]WriteCHANGELOGforsuggestedversion0.2.1[y/N]:yConfigurationOf the command line arguments, most of them can be configured insetup.cfgto remove
the need to pass them in every time.Examplesetup.cfg:[changelog_gen]commit=truerelease=trueallow_dirty=falseConfiguration file -- Global configurationGeneral configuration is grouped in a[changelog_gen]section.commit = (True | False)[optional]default: FalseCommit changes to the changelog after writing.Also available as--commit(e.g.changelog-gen --commit)release = (True | False)[optional]default: FalseUse bumpversion to tag the releaseAlso available as--release(e.g.changelog-gen --release)allow_dirty = (True | False)[optional]default: FalseDon't abort if the current branch contains uncommitted changesAlso available as--allow-dirty(e.g.changelog-gen --allow-dirty)issue_link =[optional]default: NoneCreate links in the CHANGELOG to the originating issue. A url that contains an{issue_ref}for formatting.Example:[changelog_gen]issue_link=http://github.com/EdgyEdgemond/changelog-gen/issues/{issue_ref}date_format =[optional]default: NoneAdd a date on the version line, usestrftime and strptime format codes.
The format string can include any character, a space is included between the version tag and the date tag.When using insetup.cfgbe sure to protect the%signs (see example below) and be mindful about spacing as the string is taken straight from the=sign.Also available as--date-format(e.g.--date-format '%Y-%m-%d').Example:[changelog_gen]date_format=on %%Y-%m-%dallowed_branches =[optional]default: NonePrevent changelog being generated if the current branch is not in the supplied list. By
default all branches are allowed.Example:[changelog_gen]allowed_branches=masterdevelopsections =[optional]default: NoneDefine custom headers or new sections/headers, new sections will require a matching
section_mapping configuration.Example:[changelog_gen]sections=feat=New Featureschange=Changesremove=Removalsfix=Bugfixessection_mapping =[optional]default: NoneConfigure additional supported release_note extensions to supported changelog
sections.Example:[changelog_gen]section_mapping=test=fixbugfix=fixdocs=fixnew=featpost_process =[optional]default: NoneConfigure a REST API to contact when a release is madeSee example on Jira configuration information..url=[required]default: NoneThe url to contact.
Can have the variables{issue_ref}and{new_version}..verb=[optional]default: POSTHTTP method to use..body=[optional]default:{{"body": "Released on v{new_version}"}}The text to send to the API.
Can have the variables{issue_ref}and{new_version}..auth_env =[optional]default: NoneName of the environment variable to use to extract the basic auth information to contact the API.
The content of the variable should be{user}:{api key}.Example to post to JIRA:[changelog_gen]post_process=url=https://your-domain.atlassian.net/rest/api/2/issue/ISSUE-{issue_ref}/commentverb=POSTbody={{"body": "Released on v{new_version}"}}auth_env=JIRA_AUTHThis assumes an environment variableJIRA_AUTHwith the contentuser@domain.com:{api_key}.
Seemanage-api-tokens-for-your-atlassian-accountto generate a key.Note: spaces around=will not be stripped, be sure to use<field>=<value>.Also partially available as--post-process-urland--post-process-auth-env(e.g.changelog-gen --post-process-url 'http://my-api-url.domain/comment{issue_ref}' --post-process-auth-env MY_API_AUTH)ContributingThis project uses pre-commit hooks, please runpre-commit installafter cloning and installing dev dependencies.