mirror of https://github.com/pypa/pip
Merge pull request #8147 from pradyunsg/enforce-rst-extension-in-news-directory
This commit is contained in:
commit
8ce5d5abbc
|
@ -85,11 +85,18 @@ repos:
|
||||||
- id: python-no-log-warn
|
- id: python-no-log-warn
|
||||||
- id: python-no-eval
|
- id: python-no-eval
|
||||||
- id: rst-backticks
|
- id: rst-backticks
|
||||||
# Validate existing ReST files and NEWS fragments.
|
files: .*\.rst$
|
||||||
files: .*\.rst$|^news/.*
|
|
||||||
types: [file]
|
types: [file]
|
||||||
# The errors flagged in NEWS.rst are old.
|
exclude: NEWS.rst # The errors flagged in NEWS.rst are old.
|
||||||
exclude: NEWS.rst
|
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: news-fragment-filenames
|
||||||
|
name: NEWS fragment
|
||||||
|
language: fail
|
||||||
|
entry: NEWS fragment files must be named *.(process|removal|feature|bugfix|vendor|doc|trivial).rst
|
||||||
|
exclude: ^news/(.gitignore|.*\.(process|removal|feature|bugfix|vendor|doc|trivial).rst)
|
||||||
|
files: ^news/
|
||||||
|
|
||||||
- repo: https://github.com/mgedmin/check-manifest
|
- repo: https://github.com/mgedmin/check-manifest
|
||||||
rev: '0.43'
|
rev: '0.43'
|
||||||
|
|
|
@ -70,15 +70,17 @@ such, but it is preferred to have a dedicated issue (for example, in case the
|
||||||
PR ends up rejected due to code quality reasons).
|
PR ends up rejected due to code quality reasons).
|
||||||
|
|
||||||
Once you have an issue or pull request, you take the number and you create a
|
Once you have an issue or pull request, you take the number and you create a
|
||||||
file inside of the ``news/`` directory named after that issue number with an
|
file inside of the ``news/`` directory, named after that issue number with a
|
||||||
extension of ``removal``, ``feature``, ``bugfix``, or ``doc``. Thus if your
|
"type" of ``removal``, ``feature``, ``bugfix``, or ``doc`` associated with it.
|
||||||
issue or PR number is ``1234`` and this change is fixing a bug, then you would
|
|
||||||
create a file ``news/1234.bugfix``. PRs can span multiple categories by creating
|
If your issue or PR number is ``1234`` and this change is fixing a bug,
|
||||||
multiple files (for instance, if you added a feature and deprecated/removed the
|
then you would create a file ``news/1234.bugfix.rst``. PRs can span multiple
|
||||||
old feature at the same time, you would create ``news/NNNN.feature`` and
|
categories by creating multiple files (for instance, if you added a feature and
|
||||||
``news/NNNN.removal``). Likewise if a PR touches multiple issues/PRs you may
|
deprecated/removed the old feature at the same time, you would create
|
||||||
create a file for each of them with the exact same contents and Towncrier will
|
``news/NNNN.feature.rst`` and ``news/NNNN.removal.rst``).
|
||||||
deduplicate them.
|
|
||||||
|
If a PR touches multiple issues/PRs, you may create a file for each of them
|
||||||
|
with the exact same contents and Towncrier will deduplicate them.
|
||||||
|
|
||||||
Contents of a NEWS entry
|
Contents of a NEWS entry
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Reference in New Issue