Skip to content

Commit

Permalink
Add a note about limiting towncrier-draft to fragments directory
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyChris committed May 24, 2024
1 parent 704043f commit d85929b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/pre-commit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ The ``towncrier-draft`` hook matches the ``towncrier build --draft`` command, us

This hook runs in all stages if any text files were added or modified.

If you want to limit this to only run when files change within your fragments directory, you can add ``files`` to your pre-commit configuration.
For example, if you use the default ``newsfragments`` directory:

.. code-block:: yaml
...
- id: towncrier-draft
files: newsfragments/
.. note::

The ``draft`` hook was previously (somewhat confusingly) named ``towncrier-check``.
Expand Down

0 comments on commit d85929b

Please sign in to comment.