forked from ethereum/trinity
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure towncrier to auto generate release notes
Fixes ethereum#754, ethereum#101
- Loading branch information
Showing
9 changed files
with
88 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Setup towncrier to generate release notes from fragment files to ensure a higher standard | ||
for release notes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
This directory collects "newsfragments": short files that each contain | ||
a snippet of ReST-formatted text that will be added to the next | ||
release notes. This should be a description of aspects of the change | ||
(if any) that are relevant to users. (This contrasts with the | ||
commit message and PR description, which are a description of the change as | ||
relevant to people working on the code itself.) | ||
|
||
Each file should be named like `<ISSUE>.<TYPE>.rst`, where | ||
`<ISSUE>` is an issue numbers, and `<TYPE>` is one of: | ||
|
||
* `feature` | ||
* `bugfix` | ||
* `doc` | ||
* `removal` | ||
* `misc` | ||
|
||
So for example: `123.feature.rst`, `456.bugfix.rst` | ||
|
||
If the PR fixes an issue, use that number here. If there is no issue, | ||
then open up the PR first and use the PR number for the newsfragment. | ||
|
||
Note that the `towncrier` tool will automatically | ||
reflow your text, so don't try to do any fancy formatting. Run | ||
`towncrier --draft` to get a preview of what the release notes entry | ||
will look like in the final release notes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Towncrier silently ignores files that do not match the expected ending. | ||
# We use this script to ensure we catch these as errors in CI. | ||
|
||
import os | ||
import pathlib | ||
|
||
ALLOWED_EXTENSIONS = ( | ||
'feature.rst', | ||
'bugfix.rst', | ||
'doc.rst', | ||
'removal.rst', | ||
'misc.rst', | ||
) | ||
|
||
ALLOWED_FILES = ( | ||
'validate_files.py', | ||
'README.md', | ||
) | ||
|
||
THIS_DIR = pathlib.Path(__file__).parent | ||
|
||
for file in THIS_DIR.iterdir(): | ||
|
||
if file.name in ALLOWED_FILES: | ||
continue | ||
|
||
full_extension = "".join(file.suffixes) | ||
if full_extension not in ALLOWED_EXTENSIONS: | ||
raise Exception(f"Unexpected file: {file}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[tool.towncrier] | ||
# Usage: | ||
# - PRs should drop a file like "issuenumber.feature" in newsfragments | ||
# (or "bugfix", "doc", "removal", "misc"; misc gets no text, we can | ||
# customize this) | ||
# - At release time after bumping version number, run: towncrier | ||
# (or towncrier --draft) | ||
package = "trinity" | ||
filename = "docs/release_notes.rst" | ||
directory = "newsfragments" | ||
underlines = ["-", "~", "^"] | ||
issue_format = "`#{issue} <https://github.com/ethereum/trinity/issues/{issue}>`__" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters