Skip to content

Commit

Permalink
Switch to towncrier for changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Apr 17, 2024
1 parent c4d5902 commit 9dbf568
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 62 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,22 @@ jobs:
- name: Check CONTRIBUTING.md
uses: cylc/release-actions/check-shortlog@v1

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Create & checkout PR branch
uses: cylc/release-actions/stage-1/checkout-pr-branch@v1

- name: Set the package version
run: |
npm version $VERSION
- name: Update "released on" date in changelog
continue-on-error: true
uses: cylc/release-actions/stage-1/update-changelog-release-date@v1
with:
changelog-file: 'CHANGES.md'
- name: Generate changelog
run: |
python3 -m pip install -q towncrier
towncrier build --yes --version $VERSION
- name: Create pull request
uses: cylc/release-actions/stage-1/create-release-pr@v1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
node-version: 'lts/*'
cache: yarn

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install
run: yarn install

Expand All @@ -51,6 +56,11 @@ jobs:
- name: Check browser compatibility
run: yarn run lint:compat

- name: Towncrier - draft changelog
run: |
python3 -m pip install -q towncrier
towncrier build --draft --version $(node -p "require('./package.json').version")
cypress-run:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
Expand Down
91 changes: 42 additions & 49 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,14 @@ all changes see the [closed
milestones](https://github.com/cylc/cylc-ui/milestones?state=closed) for each
release.

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

### Enhancements

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

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

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-2.3.0 (<span actions:bind='release-date'>Released 2023-11-28</span>)__

## cylc-ui-2.3.0 (Released 2023-11-28)

### Fixes

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

-------------------------------------------------------------------------------
## __cylc-ui-2.2.0 (<span actions:bind='release-date'>Released 2023-11-02</span>)__

## cylc-ui-2.2.0 (Released 2023-11-02)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-2.1.0 (<span actions:bind='release-date'>Released 2023-09-07</span>)__

## cylc-ui-2.1.0 (Released 2023-09-07)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-2.0.0 (<span actions:bind='release-date'>Released 2023-07-21</span>)__

## cylc-ui-2.0.0 (Released 2023-07-21)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.6.0 (<span actions:bind='release-date'>Released 2023-04-27</span>)__

## cylc-ui-1.6.0 (Released 2023-04-27)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.5.0 (<span actions:bind='release-date'>Released 2023-02-20</span>)__

## cylc-ui-1.5.0 (Released 2023-02-20)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.4.0 (<span actions:bind='release-date'>Released 2023-01-16</span>)__

## cylc-ui-1.4.0 (Released 2023-01-16)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.3.0 (<span actions:bind='release-date'>Released 2022-07-27</span>)__

## cylc-ui-1.3.0 (Released 2022-07-27)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.2.1 (<span actions:bind='release-date'>Released 2022-05-30</span>)__

## cylc-ui-1.2.1 (Released 2022-05-30)

### Fixes

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

-------------------------------------------------------------------------------
## __cylc-ui-1.2.0 (<span actions:bind='release-date'>Released 2022-05-19</span>)__

## cylc-ui-1.2.0 (Released 2022-05-19)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.1.0 (<span actions:bind='release-date'>Released 2022-03-23</span>)__

## cylc-ui-1.1.0 (Released 2022-03-23)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-1.0.0 (<span actions:bind='release-date'>Released 2022-02-17</span>)__

## cylc-ui-1.0.0 (Released 2022-02-17)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-0.6 (<span actions:bind='release-date'>Released 2021-11-10</span>)__

## cylc-ui-0.6 (Released 2021-11-10)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-0.5 (<span actions:bind='release-date'>Released 2021-07-28</span>)__

## cylc-ui-0.5 (Released 2021-07-28)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-0.4 (Released 2021-04-16)__

## cylc-ui-0.4 (Released 2021-04-16)

### Enhancements

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

-------------------------------------------------------------------------------
## __cylc-ui-0.3 (Released 2021-03-25)__

## cylc-ui-0.3 (Released 2021-03-25)

Release 0.3 of Cylc UI.

Expand Down Expand Up @@ -500,8 +493,8 @@ None.

None.

-------------------------------------------------------------------------------
## __cylc-ui-0.2 (2020-07-14)__

## cylc-ui-0.2 (2020-07-14)

Release 0.2 of Cylc UI.

Expand Down Expand Up @@ -593,7 +586,7 @@ of a user guide.

None.

-------------------------------------------------------------------------------
## __cylc-ui-0.1 (2019-09-18)__

## cylc-ui-0.1 (2019-09-18)

Initial release of Cylc UI.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ first Pull Request (for each Cylc repository you contribute to).

## Contribute Code

**Enhancements** are made on the `master` branch.

**Bugfixes** are made on the branch of the same name as the issue's milestone.
E.G. if the issue is on the `8.0.x` milestone, branch off of `8.0.x` to
develop your bugfix, then raise the pull request against the `8.0.x` branch.
We will later merge the `8.0.x` branch into `master`.

Feel free to ask questions on the issue or developers chat if unsure about
Contributions are generally made against the `master` branch.
Feel free to ask questions on the issue or [developers chat](https://matrix.to/#/#cylc-web-gui:matrix.org) if unsure about
anything.

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


## Code Contributors

Expand Down
1 change: 1 addition & 0 deletions changes.d/1751.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
More view options are now remembered & restored when navigating between workflows.
13 changes: 13 additions & 0 deletions changes.d/template.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% if sections[""] %}
{% for category, val in definitions.items() if category in sections[""] %}
### {{ definitions[category]['name'] }}

{% for text, pulls in sections[""][category].items() %}
{{ pulls|join(', ') }} - {{ text }}

{% endfor %}
{% endfor %}
{% else %}
No significant changes.

{% endif %}
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.towncrier]
directory = "changes.d"
filename = "CHANGES.md"
template = "changes.d/template.jinja"
underlines = ["", "", ""]
title_format = "## cylc-ui-{version} (Released {project_date})"
issue_format = "[#{issue}](https://github.com/cylc/cylc-ui/pull/{issue})"

# These changelog sections will be shown in the defined order:
[[tool.towncrier.type]]
directory = "feat" # NB this is just the filename not directory e.g. 123.break.md
name = "🚀 Enhancements"
showcontent = true
[[tool.towncrier.type]]
directory = "fix"
name = "🔧 Fixes"
showcontent = true

0 comments on commit 9dbf568

Please sign in to comment.