Add support for linking to issues and adding datestamps to changelog entries.

This commit is contained in:
Jason R. Coombs
2016-04-02 22:23:15 -04:00
parent 58f71d1e2b
commit 01e953bac9
3 changed files with 22 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import setuptools_scm
extensions = [
'sphinx.ext.autodoc',
'rst.linker',
]
# General information about the project.
@@ -17,3 +18,22 @@ version = setuptools_scm.get_version(root='..', relative_to=__file__)
release = version
master_doc = 'index'
link_files = {
'CHANGES.rst': dict(
using=dict(
GH='https://github.com',
project=project,
),
replace=[
dict(
pattern=r"(Issue )?#(?P<issue>\d+)",
url='{GH}/jaraco/{project}/issues/{issue}',
),
dict(
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
),
],
),
}

View File

@@ -5,4 +5,4 @@
History
*******
.. include:: ../CHANGES.rst
.. include:: ../CHANGES (links).rst