Skip to content

Commit 9dbf568

Browse files
committed
Switch to towncrier for changelog
1 parent c4d5902 commit 9dbf568

File tree

7 files changed

+100
-62
lines changed

7 files changed

+100
-62
lines changed

.github/workflows/create_release_pr.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@ jobs:
2929
- name: Check CONTRIBUTING.md
3030
uses: cylc/release-actions/check-shortlog@v1
3131

32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.x'
36+
3237
- name: Create & checkout PR branch
3338
uses: cylc/release-actions/stage-1/checkout-pr-branch@v1
3439

3540
- name: Set the package version
3641
run: |
3742
npm version $VERSION
3843
39-
- name: Update "released on" date in changelog
40-
continue-on-error: true
41-
uses: cylc/release-actions/stage-1/update-changelog-release-date@v1
42-
with:
43-
changelog-file: 'CHANGES.md'
44+
- name: Generate changelog
45+
run: |
46+
python3 -m pip install -q towncrier
47+
towncrier build --yes --version $VERSION
4448
4549
- name: Create pull request
4650
uses: cylc/release-actions/stage-1/create-release-pr@v1

.github/workflows/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
node-version: 'lts/*'
2828
cache: yarn
2929

30+
- name: Setup Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.x'
34+
3035
- name: Install
3136
run: yarn install
3237

@@ -51,6 +56,11 @@ jobs:
5156
- name: Check browser compatibility
5257
run: yarn run lint:compat
5358

59+
- name: Towncrier - draft changelog
60+
run: |
61+
python3 -m pip install -q towncrier
62+
towncrier build --draft --version $(node -p "require('./package.json').version")
63+
5464
cypress-run:
5565
runs-on: ${{ matrix.os }}
5666
timeout-minutes: 15

CHANGES.md

Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,14 @@ all changes see the [closed
55
milestones](https://github.com/cylc/cylc-ui/milestones?state=closed) for each
66
release.
77

8-
<!-- The topmost release date is automatically updated by GitHub Actions. When
9-
creating a new release entry be sure to copy & paste the span tag with the
10-
`actions:bind` attribute, which is used by a regex to find the text to be
11-
updated. Only the first match gets replaced, so it's fine to leave the old
12-
ones in. -->
13-
-------------------------------------------------------------------------------
14-
## __cylc-ui-2.5.0 (<span actions:bind='release-date'>Upcoming</span>)__
8+
<!--
9+
NOTE: Do not add entries here, use towncrier (installed via pip) fragments instead:
10+
$ towncrier create <PR-number>.<feat|fix>.md --content "Short description"
11+
-->
1512

16-
### Enhancements
17-
18-
[#1751](https://github.com/cylc/cylc-ui/pull/1751) -
19-
More view options are now remembered & restored when navigating between workflows.
13+
<!-- towncrier release notes start -->
2014

21-
-------------------------------------------------------------------------------
22-
## __cylc-ui-2.4.0 (<span actions:bind='release-date'>Released 2024-04-02</span>)__
15+
## cylc-ui-2.4.0 (Released 2024-04-02)
2316

2417
### Enhancements
2518

@@ -48,16 +41,16 @@ Various other efficiency improvements.
4841
Fix bug where the up/down/home/end keys would not work inside the Edit Runtime
4942
form inputs.
5043

51-
-------------------------------------------------------------------------------
52-
## __cylc-ui-2.3.0 (<span actions:bind='release-date'>Released 2023-11-28</span>)__
44+
45+
## cylc-ui-2.3.0 (Released 2023-11-28)
5346

5447
### Fixes
5548

5649
[#1549](https://github.com/cylc/cylc-ui/pull/1549) -
5750
Fix workflow filtering bug in the sidebar.
5851

59-
-------------------------------------------------------------------------------
60-
## __cylc-ui-2.2.0 (<span actions:bind='release-date'>Released 2023-11-02</span>)__
52+
53+
## cylc-ui-2.2.0 (Released 2023-11-02)
6154

6255
### Enhancements
6356

@@ -78,8 +71,8 @@ Fixed bug where toggle buttons in view toolbars would not change state.
7871
[#1434](https://github.com/cylc/cylc-ui/pull/1434) -
7972
Small accessibility/appearance improvements.
8073

81-
-------------------------------------------------------------------------------
82-
## __cylc-ui-2.1.0 (<span actions:bind='release-date'>Released 2023-09-07</span>)__
74+
75+
## cylc-ui-2.1.0 (Released 2023-09-07)
8376

8477
### Enhancements
8578

@@ -95,8 +88,8 @@ Pinned buttons to the bottom of the command edit form.
9588
[#1437](https://github.com/cylc/cylc-ui/pull/1437) -
9689
Add landing page for unauthorised users.
9790

98-
-------------------------------------------------------------------------------
99-
## __cylc-ui-2.0.0 (<span actions:bind='release-date'>Released 2023-07-21</span>)__
91+
92+
## cylc-ui-2.0.0 (Released 2023-07-21)
10093

10194
### Enhancements
10295

@@ -127,8 +120,8 @@ Fixed incorrect latest job info in table view.
127120
[#1336](https://github.com/cylc/cylc-ui/pull/1336) -
128121
Fixed task state filtering bug in tree view.
129122

130-
-------------------------------------------------------------------------------
131-
## __cylc-ui-1.6.0 (<span actions:bind='release-date'>Released 2023-04-27</span>)__
123+
124+
## cylc-ui-1.6.0 (Released 2023-04-27)
132125

133126
### Enhancements
134127

@@ -149,8 +142,8 @@ A new view that displays task timing statistics
149142
when navigating between workflows in the standalone `#/tree/` and `#/table/`
150143
views.
151144

152-
-------------------------------------------------------------------------------
153-
## __cylc-ui-1.5.0 (<span actions:bind='release-date'>Released 2023-02-20</span>)__
145+
146+
## cylc-ui-1.5.0 (Released 2023-02-20)
154147

155148
### Enhancements
156149

@@ -169,8 +162,8 @@ use multi-level family inheritance.
169162
[#1182](https://github.com/cylc/cylc-ui/pull/1182) - Fixes bug in filtering
170163
by task name.
171164

172-
-------------------------------------------------------------------------------
173-
## __cylc-ui-1.4.0 (<span actions:bind='release-date'>Released 2023-01-16</span>)__
165+
166+
## cylc-ui-1.4.0 (Released 2023-01-16)
174167

175168
### Enhancements
176169

@@ -219,24 +212,24 @@ of the table view so it matches the tree view.
219212
[#1107](https://github.com/cylc/cylc-ui/pull/1107) - Use natural sort for table
220213
view cycle point column.
221214

222-
-------------------------------------------------------------------------------
223-
## __cylc-ui-1.3.0 (<span actions:bind='release-date'>Released 2022-07-27</span>)__
215+
216+
## cylc-ui-1.3.0 (Released 2022-07-27)
224217

225218
### Enhancements
226219

227220
[#1073](https://github.com/cylc/cylc-ui/pull/1073) - Improve validation of the
228221
command edit form.
229222

230-
-------------------------------------------------------------------------------
231-
## __cylc-ui-1.2.1 (<span actions:bind='release-date'>Released 2022-05-30</span>)__
223+
224+
## cylc-ui-1.2.1 (Released 2022-05-30)
232225

233226
### Fixes
234227

235228
[#1011](https://github.com/cylc/cylc-ui/pull/1011) - Fix bug where the
236229
workflow commands menu would show the wrong workflow.
237230

238-
-------------------------------------------------------------------------------
239-
## __cylc-ui-1.2.0 (<span actions:bind='release-date'>Released 2022-05-19</span>)__
231+
232+
## cylc-ui-1.2.0 (Released 2022-05-19)
240233

241234
### Enhancements
242235

@@ -250,16 +243,16 @@ workflow commands menu would show the wrong workflow.
250243
[#979](https://github.com/cylc/cylc-ui/pull/979) - Fix bug where the commands
251244
menu could sometimes break.
252245

253-
-------------------------------------------------------------------------------
254-
## __cylc-ui-1.1.0 (<span actions:bind='release-date'>Released 2022-03-23</span>)__
246+
247+
## cylc-ui-1.1.0 (Released 2022-03-23)
255248

256249
### Enhancements
257250

258251
[#928](https://github.com/cylc/cylc-ui/pull/928) - Enable accessing the workflow
259252
commands menu from GScan (sidebar).
260253

261-
-------------------------------------------------------------------------------
262-
## __cylc-ui-1.0.0 (<span actions:bind='release-date'>Released 2022-02-17</span>)__
254+
255+
## cylc-ui-1.0.0 (Released 2022-02-17)
263256

264257
### Enhancements
265258

@@ -285,8 +278,8 @@ or jobs now shows the relevant ID and status.
285278
[#927](https://github.com/cylc/cylc-ui/pull/927) - Fix bug where the commands
286279
menu would disappear when clicking on another task/cycle point/etc.
287280

288-
-------------------------------------------------------------------------------
289-
## __cylc-ui-0.6 (<span actions:bind='release-date'>Released 2021-11-10</span>)__
281+
282+
## cylc-ui-0.6 (Released 2021-11-10)
290283

291284
### Enhancements
292285

@@ -315,8 +308,8 @@ commands in the commands menu.
315308
- Fix issues with the workflow status and play/pause/stop buttons not
316309
updating correctly & enable starting a workflow from stopped.
317310

318-
-------------------------------------------------------------------------------
319-
## __cylc-ui-0.5 (<span actions:bind='release-date'>Released 2021-07-28</span>)__
311+
312+
## cylc-ui-0.5 (Released 2021-07-28)
320313

321314
### Enhancements
322315

@@ -385,8 +378,8 @@ fetches more data than what it needs when GScan + a view/component are used.
385378
[#671](https://github.com/cylc/cylc-ui/pull/671) - UI shows loading state
386379
forever if no workflows exist.
387380

388-
-------------------------------------------------------------------------------
389-
## __cylc-ui-0.4 (Released 2021-04-16)__
381+
382+
## cylc-ui-0.4 (Released 2021-04-16)
390383

391384
### Enhancements
392385

@@ -397,8 +390,8 @@ Display the new "platform" for jobs rather than the legacy "host" value.
397390
Create a urls module to simplify how we concatenate strings to create
398391
URLs.
399392

400-
-------------------------------------------------------------------------------
401-
## __cylc-ui-0.3 (Released 2021-03-25)__
393+
394+
## cylc-ui-0.3 (Released 2021-03-25)
402395

403396
Release 0.3 of Cylc UI.
404397

@@ -500,8 +493,8 @@ None.
500493

501494
None.
502495

503-
-------------------------------------------------------------------------------
504-
## __cylc-ui-0.2 (2020-07-14)__
496+
497+
## cylc-ui-0.2 (2020-07-14)
505498

506499
Release 0.2 of Cylc UI.
507500

@@ -593,7 +586,7 @@ of a user guide.
593586

594587
None.
595588

596-
-------------------------------------------------------------------------------
597-
## __cylc-ui-0.1 (2019-09-18)__
589+
590+
## cylc-ui-0.1 (2019-09-18)
598591

599592
Initial release of Cylc UI.

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ first Pull Request (for each Cylc repository you contribute to).
2222

2323
## Contribute Code
2424

25-
**Enhancements** are made on the `master` branch.
26-
27-
**Bugfixes** are made on the branch of the same name as the issue's milestone.
28-
E.G. if the issue is on the `8.0.x` milestone, branch off of `8.0.x` to
29-
develop your bugfix, then raise the pull request against the `8.0.x` branch.
30-
We will later merge the `8.0.x` branch into `master`.
31-
32-
Feel free to ask questions on the issue or developers chat if unsure about
25+
Contributions are generally made against the `master` branch.
26+
Feel free to ask questions on the issue or [developers chat](https://matrix.to/#/#cylc-web-gui:matrix.org) if unsure about
3327
anything.
3428

29+
We use [towncrier](https://towncrier.readthedocs.io/en/stable/index.html) for
30+
generating the changelog. Changelog entries are added by running
31+
```
32+
towncrier create <PR-number>.<break|feat|fix>.md --content "Short description"
33+
```
34+
3535

3636
## Code Contributors
3737

changes.d/1751.feat.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
More view options are now remembered & restored when navigating between workflows.

changes.d/template.jinja

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% if sections[""] %}
2+
{% for category, val in definitions.items() if category in sections[""] %}
3+
### {{ definitions[category]['name'] }}
4+
5+
{% for text, pulls in sections[""][category].items() %}
6+
{{ pulls|join(', ') }} - {{ text }}
7+
8+
{% endfor %}
9+
{% endfor %}
10+
{% else %}
11+
No significant changes.
12+
13+
{% endif %}

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[tool.towncrier]
2+
directory = "changes.d"
3+
filename = "CHANGES.md"
4+
template = "changes.d/template.jinja"
5+
underlines = ["", "", ""]
6+
title_format = "## cylc-ui-{version} (Released {project_date})"
7+
issue_format = "[#{issue}](https://github.com/cylc/cylc-ui/pull/{issue})"
8+
9+
# These changelog sections will be shown in the defined order:
10+
[[tool.towncrier.type]]
11+
directory = "feat" # NB this is just the filename not directory e.g. 123.break.md
12+
name = "🚀 Enhancements"
13+
showcontent = true
14+
[[tool.towncrier.type]]
15+
directory = "fix"
16+
name = "🔧 Fixes"
17+
showcontent = true

0 commit comments

Comments
 (0)