Skip to content

Commit d9f7288

Browse files
krpatter-intctwm
andauthored
Apply suggestions from code review
Co-authored-by: Tom Most <twm@freecog.net>
1 parent 69c78a6 commit d9f7288

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/cli.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ By default, ``towncrier`` compares the current branch against ``origin/main`` (a
124124

125125
.. option:: --staged
126126

127-
Include files that have been staged for commit when checking for news fragments
127+
Include files that have been staged for commit when checking for news fragments::
128128

129129
$ towncrier check --staged
130130
$ towncrier check --staged --compare-with origin/trunk

src/towncrier/check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _get_default_compare_branch(branches: Container[str]) -> str | None:
6363
is_flag=True,
6464
default=False,
6565
metavar="STAGED",
66-
help="include staged files as part of the branch checked in the --compare-with",
66+
help="Include staged files as part of the branch checked in the --compare-with",
6767
)
6868
def _main(
6969
compare_with: str | None, directory: str | None, config: str | None, staged: bool
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
new `--staged` parameter for the `check` to included staged files as part of confirming a news file exists
1+
The `towncrier check` command now has a `--staged` flag to inspect the files staged for commit when checking for a news fragment: useful in a pre-commit hook

0 commit comments

Comments
 (0)