Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Most <[email protected]>
  • Loading branch information
krpatter-intc and twm authored Dec 4, 2024
1 parent 69c78a6 commit d9f7288
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ By default, ``towncrier`` compares the current branch against ``origin/main`` (a

.. option:: --staged

Include files that have been staged for commit when checking for news fragments
Include files that have been staged for commit when checking for news fragments::

$ towncrier check --staged
$ towncrier check --staged --compare-with origin/trunk
2 changes: 1 addition & 1 deletion src/towncrier/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _get_default_compare_branch(branches: Container[str]) -> str | None:
is_flag=True,
default=False,
metavar="STAGED",
help="include staged files as part of the branch checked in the --compare-with",
help="Include staged files as part of the branch checked in the --compare-with",
)
def _main(
compare_with: str | None, directory: str | None, config: str | None, staged: bool
Expand Down
2 changes: 1 addition & 1 deletion src/towncrier/newsfragments/676.feature.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
new `--staged` parameter for the `check` to included staged files as part of confirming a news file exists
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 comments on commit d9f7288

Please sign in to comment.