File tree Expand file tree Collapse file tree 5 files changed +250
-4
lines changed Expand file tree Collapse file tree 5 files changed +250
-4
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,24 @@ jobs:
192
192
GH_TOKEN : " ${{ secrets.NTC_GITHUB_TOKEN }}"
193
193
needs :
194
194
- " pytest"
195
+ changelog :
196
+ if : >
197
+ contains(fromJson('["develop"]'), github.base_ref) &&
198
+ (github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
199
+ runs-on : " ubuntu-22.04"
200
+ steps :
201
+ - name : " Check out repository code"
202
+ uses : " actions/checkout@v4"
203
+ with :
204
+ fetch-depth : " 0"
205
+ - name : " Setup environment"
206
+ uses : " networktocode/gh-action-setup-poetry-environment@v6"
207
+ with :
208
+ poetry-version : " 1.8.5"
209
+ - name : " Check for changelog entry"
210
+ run : |
211
+ git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
212
+ poetry run towncrier check --compare-with origin/${{ github.base_ref }}
195
213
publish_pypi :
196
214
name : " Push Package to PyPI"
197
215
runs-on : " ubuntu-24.04"
Original file line number Diff line number Diff line change
1
+ Add changelog check in the CI
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ types-pytz = "^2022.0.0"
58
58
types-toml = " ^0.10.1"
59
59
netconan = " ^0.12.3"
60
60
toml = " 0.10.2"
61
+ towncrier = " ^24.8.0"
61
62
types-chardet = " ^5.0.4"
62
63
pandas-stubs = " 2.2.2.240603"
63
64
coverage = " ^7.6.12"
@@ -144,7 +145,7 @@ addopts = "-vv --doctest-modules -p no:warnings --ignore-glob='*mock*'"
144
145
package = " circuit_maintenance_parser"
145
146
directory = " changes"
146
147
filename = " docs/release_notes.md"
147
- template = " changes/ towncrier_template.j2"
148
+ template = " towncrier_template.j2"
148
149
start_string = " <!-- towncrier release notes start -->"
149
150
issue_format = " [#{issue}](https://github.com/networktocode/circuit_maintenance_parser/issues/{issue})"
150
151
Original file line number Diff line number Diff line change
1
+
2
+ # v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes
3
+
4
+ This document describes all new features and changes in the release. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+
6
+ ## Release Overview
7
+
8
+ - Major features or milestones
9
+ - Changes to compatibility with Nautobot and/or other apps, libraries etc.
10
+
11
+ {% if render_title %}
12
+ ## [v{{ versiondata.version }} ({{ versiondata.date }})](https://github.com/networktocode/circuit_maintenance_parser/releases/tag/v{{ versiondata.version}})
13
+
14
+ {% endif %}
15
+ {% for section , _ in sections .items () %}
16
+ {% if sections [section ] %}
17
+ {% for category , val in definitions .items () if category in sections [section ] %}
18
+ {% if sections [section ][category ]|length != 0 %}
19
+ ### {{ definitions[category] ['name'] }}
20
+
21
+ {% if definitions [category ]['showcontent' ] %}
22
+ {% for text , values in sections [section ][category ].items () %}
23
+ {% for item in text .split ('\n' ) %}
24
+ {% if values %}
25
+ - {{ values|join(', ') }} - {{ item.strip() }}
26
+ {% else %}
27
+ - {{ item.strip() }}
28
+ {% endif %}
29
+ {% endfor %}
30
+ {% endfor %}
31
+
32
+ {% else %}
33
+ - {{ sections[section] [category] [''] |join(', ') }}
34
+
35
+ {% endif %}
36
+ {% endif %}
37
+ {% endfor %}
38
+ {% else %}
39
+ No significant changes.
40
+
41
+ {% endif %}
42
+ {% endfor %}
You can’t perform that action at this time.
0 commit comments