File tree Expand file tree Collapse file tree 3 files changed +52
-2
lines changed Expand file tree Collapse file tree 3 files changed +52
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Reference: https://github.com/vaab/gitchangelog/blob/master/src/gitchangelog/gitchangelog.rc.reference
2
+
3
+ FILENAME = 'CHANGES.rst'
4
+
5
+ unreleased_version_label = 'Unreleased (master)'
6
+ include_merge = False
7
+
8
+ section_regexps = [
9
+ ('New', [
10
+ r'^[Nn]ew',
11
+ r'^[Aa]dd',
12
+ ]),
13
+ ('Fixes', [
14
+ r'^[Ff]ix',
15
+ r'^[Uu]pdate',
16
+ r'[Aa]llow',
17
+ ]),
18
+ ('Docs', [
19
+ r'([Dd]ocs|[Dd]ocumentation)',
20
+ r'[Bb]adges?',
21
+ ]),
22
+ ('Other', None ## Match all lines
23
+ ),
24
+ ]
25
+
26
+ subject_process = (strip | ucfirst | final_dot)
27
+ ignore_regexps = [
28
+ r'[Pp][Ee][Pp]\-?8',
29
+ r'[Tt][Yy][Pp][Oo]',
30
+ r'spelling',
31
+ #r'[Ff]ormat(ing)?',
32
+ r'^$', ## ignore commits with empty messages
33
+ ]
34
+
35
+ body_process = ReSub(r'.*', r'') | strip
36
+
37
+ revs = ["^4.0.0", "HEAD"]
38
+
39
+ def write_changelog(lines):
40
+ """Write changelog to file."""
41
+ with open(FILENAME, 'wt') as f:
42
+ f.writelines(lines)
43
+
44
+ publish = write_changelog
Original file line number Diff line number Diff line change @@ -130,6 +130,10 @@ def run_repos_builder(*_):
130
130
subprocess .check_call ("pwd; cp repos.json ../docs/html_extras/" , shell = True )
131
131
os .chdir (last_dir )
132
132
133
+ # -- Changelog -----------------------------------------------------------------
134
+
135
+ def run_changelog (_ ):
136
+ subprocess .check_call ("gitchangelog" , shell = True )
133
137
134
138
# -- Options for HTML output ---------------------------------------------------
135
139
@@ -321,3 +325,4 @@ def setup(app):
321
325
app .connect ("autodoc-skip-member" , autodoc_skip_member )
322
326
app .connect ("builder-inited" , run_apidoc )
323
327
#app.connect("html-page-context", run_repos_builder)
328
+ app .connect ("builder-inited" , run_changelog )
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ sphinx>=1.2
3
3
sphinx-autodoc-annotation
4
4
5
5
-e .
6
- slixmpp
6
+ gitchangelog
7
+ hypchat
7
8
irc
8
9
pyfire
9
10
python-telegram-bot
10
11
slackclient
11
- hypchat
12
+ slixmpp
You can’t perform that action at this time.
0 commit comments