Skip to content

Commit

Permalink
Copy towncrier types from project template.
Browse files Browse the repository at this point in the history
- This updates the ``towncrier`` types. Seems like we were missing a few.
  • Loading branch information
fselmo committed Oct 7, 2022
1 parent 0b76cde commit ab89b2a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 21 deletions.
10 changes: 6 additions & 4 deletions newsfragments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ release notes. This should be a description of aspects of the change
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
Each file should be named like `<ISSUE>.<TYPE>.rst`, where
`<ISSUE>` is an issue number, and `<TYPE>` is one of:

* `feature`
* `bugfix`
* `performance`
* `doc`
* `internal`
* `removal`
* `misc`
* `breaking-change`
* `deprecation`
* `breaking`

So for example: `123.feature.rst`, `456.bugfix.rst`

Expand All @@ -22,5 +24,5 @@ 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
`towncrier build --draft` to get a preview of what the release notes entry
will look like in the final release notes.
6 changes: 4 additions & 2 deletions newsfragments/validate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
import sys

ALLOWED_EXTENSIONS = {
'.breaking.rst',
'.bugfix.rst',
'.doc.rst',
'.feature.rst',
'.internal.rst',
'.misc.rst',
'.breaking-change.rst',
'.deprecation.rst',
'.performance.rst',
'.removal.rst',
}

ALLOWED_FILES = {
Expand Down
40 changes: 25 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,44 @@
title_format = "v{version} ({project_date})"

[[tool.towncrier.type]]
directory = "breaking-change"
name="Breaking Changes"
showcontent=true
directory = "feature"
name = "Features"
showcontent = true

[[tool.towncrier.type]]
directory = "deprecation"
name = "Deprecations"
directory = "bugfix"
name = "Bugfixes"
showcontent = true

[[tool.towncrier.type]]
directory = "bugfix"
name="Bugfixes"
showcontent=true
directory = "performance"
name = "Performance improvements"
showcontent = true

[[tool.towncrier.type]]
directory = "doc"
name="Documentation Updates"
showcontent=true
name = "Improved Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "feature"
name="Features"
showcontent=true
directory = "removal"
name = "Deprecations and Removals"
showcontent = true

[[tool.towncrier.type]]
directory = "internal"
name = "Internal Changes - for <PROJECT_NAME> Contributors"
showcontent = true

[[tool.towncrier.type]]
directory = "misc"
name="Misc"
showcontent=false
name = "Miscellaneous changes"
showcontent = false

[[tool.towncrier.type]]
directory = "breaking"
name = "Breaking changes"
showcontent = true

[tool.isort]
profile="black"

0 comments on commit ab89b2a

Please sign in to comment.