Branch-based fragment file names for towncrier
Project description
branchnews
helps you used branch-based file names with towncrier
.
If you are not already familiar with towncrier, it is a great tool for generating changelogs, based on news fragment files.
However, a difficulty arises if you want to record a news fragment for a PR (pull request) that does not correspond to an existing issue. In such cases, it is hard to choose a name for the fragment file while preparing the PR, because you do not know the number the PR will receive, until after it has already been opened.
The solution provided by branchnews
is to let you instead record the fragment
under a filename based on your GitHub username and the name of your topic branch,
like this:
USERNAME.BRANCHNAME.branchnews.NEWS_TYPE.txt
The
$ branchnews create
command helps you generate this file.
The one requirement is that, when the PR is merged, you accept the standard GitHub merge commit message of the form,
Merge pull request #NUMBER from USERNAME/BRANCHNAME
Then, when you are ready to generate your changelog, first use
$ branchnews rename
to rename the fragment files. This will rename files
like USERNAME.BRANCHNAME.branchnews.NEWS_TYPE.txt
to NUMBER.NEWS_TYPE.txt
, using the merge commit messages from the git log to
determine the PR numbers.
After committing these renames, you can procede to use towncrier
as normal.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file branchnews-0.1.0.tar.gz
.
File metadata
- Download URL: branchnews-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d83446c75aca6cbaa4dfdd1db0a8ae82292022c468d4972da3b27e2205c4b65 |
|
MD5 | da6ff67651f227fa01a6c56cf4f904e6 |
|
BLAKE2b-256 | bf7bfae50697b8d76c7eda85b924e8a32abf13a3acdf508f98bbc3eb8e6aaf64 |
File details
Details for the file branchnews-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: branchnews-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0c32256971fee9c794c4b18372b974b35bc4be945df05a57a01b7d2125aafd2 |
|
MD5 | cdee5fffc5dd71ddecc45ff231e48340 |
|
BLAKE2b-256 | 21d831bf161b59ae883e3619a1d746546d20de831e6c970e72f22b44436273f9 |