mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Add internal type for release notes
This commit is contained in:
committed by
Christoph Burgdorf
parent
07eecb5c69
commit
89363b2d9b
@ -12,6 +12,7 @@ Each file should be named like `<ISSUE>.<TYPE>.rst`, where
|
|||||||
* `bugfix`
|
* `bugfix`
|
||||||
* `performance`
|
* `performance`
|
||||||
* `doc`
|
* `doc`
|
||||||
|
* `internal`
|
||||||
* `removal`
|
* `removal`
|
||||||
* `misc`
|
* `misc`
|
||||||
|
|
||||||
|
|||||||
@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import sys
|
||||||
|
|
||||||
ALLOWED_EXTENSIONS = {
|
ALLOWED_EXTENSIONS = {
|
||||||
'.bugfix.rst',
|
'.bugfix.rst',
|
||||||
'.doc.rst',
|
'.doc.rst',
|
||||||
'.feature.rst',
|
'.feature.rst',
|
||||||
|
'.internal.rst',
|
||||||
'.misc.rst',
|
'.misc.rst',
|
||||||
'.performance.rst',
|
'.performance.rst',
|
||||||
'.removal.rst',
|
'.removal.rst',
|
||||||
@ -22,11 +24,20 @@ ALLOWED_FILES = {
|
|||||||
|
|
||||||
THIS_DIR = pathlib.Path(__file__).parent
|
THIS_DIR = pathlib.Path(__file__).parent
|
||||||
|
|
||||||
|
num_args = len(sys.argv) - 1
|
||||||
|
assert num_args in {0, 1}
|
||||||
|
if num_args == 1:
|
||||||
|
assert sys.argv[1] in ('is-empty', )
|
||||||
|
|
||||||
for fragment_file in THIS_DIR.iterdir():
|
for fragment_file in THIS_DIR.iterdir():
|
||||||
|
|
||||||
if fragment_file.name in ALLOWED_FILES:
|
if fragment_file.name in ALLOWED_FILES:
|
||||||
continue
|
continue
|
||||||
|
elif num_args == 0:
|
||||||
full_extension = "".join(fragment_file.suffixes)
|
full_extension = "".join(fragment_file.suffixes)
|
||||||
if full_extension not in ALLOWED_EXTENSIONS:
|
if full_extension not in ALLOWED_EXTENSIONS:
|
||||||
|
raise Exception(f"Unexpected file: {fragment_file}")
|
||||||
|
elif sys.argv[1] == 'is-empty':
|
||||||
raise Exception(f"Unexpected file: {fragment_file}")
|
raise Exception(f"Unexpected file: {fragment_file}")
|
||||||
|
else:
|
||||||
|
raise RuntimeError("Strange: arguments {sys.argv} were validated, but not found")
|
||||||
|
|||||||
@ -6,8 +6,6 @@ directory = "newsfragments"
|
|||||||
underlines = ["-", "~", "^"]
|
underlines = ["-", "~", "^"]
|
||||||
issue_format = "`#{issue} <https://github.com/ethereum/<REPO_NAME>/issues/{issue}>`__"
|
issue_format = "`#{issue} <https://github.com/ethereum/<REPO_NAME>/issues/{issue}>`__"
|
||||||
|
|
||||||
# Configure all default sections plus an extra one for performance improvements.
|
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "feature"
|
directory = "feature"
|
||||||
name = "Features"
|
name = "Features"
|
||||||
@ -33,7 +31,12 @@ directory = "removal"
|
|||||||
name = "Deprecations and Removals"
|
name = "Deprecations and Removals"
|
||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "internal"
|
||||||
|
name = "Internal Changes - for <PROJECT_NAME> Contributors"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
[[tool.towncrier.type]]
|
[[tool.towncrier.type]]
|
||||||
directory = "misc"
|
directory = "misc"
|
||||||
name = "Miscellaneous internal changes"
|
name = "Miscellaneous changes"
|
||||||
showcontent = false
|
showcontent = false
|
||||||
Reference in New Issue
Block a user