Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .gitchangelog.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Reference: https://github.com/vaab/gitchangelog/blob/master/src/gitchangelog/gitchangelog.rc.reference

FILENAME = 'CHANGES.rst'

unreleased_version_label = 'Unreleased (master)'
include_merge = False

section_regexps = [
('New', [
r'^[Nn]ew',
r'^[Aa]dd',
]),
('Fixes', [
r'^[Ff]ix',
r'^[Uu]pdate',
r'[Aa]llow',
]),
('Docs', [
r'([Dd]ocs|[Dd]ocumentation)',
r'[Bb]adges?',
]),
('Other', None ## Match all lines
),
]

subject_process = (strip | ucfirst | final_dot)
ignore_regexps = [
r'[Pp][Ee][Pp]\-?8',
r'[Tt][Yy][Pp][Oo]',
r'spelling',
#r'[Ff]ormat(ing)?',
r'^$', ## ignore commits with empty messages
]

body_process = ReSub(r'.*', r'') | strip

revs = ["^4.0.0", "HEAD"]

def write_changelog(lines):
"""Write changelog to file."""
with open(FILENAME, 'wt') as f:
f.writelines(lines)

publish = write_changelog
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ def autodoc_skip_member(app, what, name, obj, skip, options):
def run_apidoc(_):
subprocess.check_call("sphinx-apidoc --separate -f -o . ../errbot", shell=True)

# -- Changelog -----------------------------------------------------------------

def run_changelog(_):
subprocess.check_call("gitchangelog", shell=True)

# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down Expand Up @@ -315,3 +320,4 @@ def run_apidoc(_):
def setup(app):
app.connect("autodoc-skip-member", autodoc_skip_member)
app.connect("builder-inited", run_apidoc)
app.connect("builder-inited", run_changelog)
5 changes: 3 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ sphinx>=1.2
https://github.com/zoni/sphinx-autodoc-annotation/archive/issue-2.zip

-e .
sleekxmpp
gitchangelog
hypchat
irc
pyfire
python-telegram-bot
slackclient
hypchat
sleekxmpp