Skip to content

Commit

Permalink
Switch to using scriv for maintaining the changelog (cvat-ai#6942)
Browse files Browse the repository at this point in the history
This is beneficial in multiple ways:

* No more `CHANGELOG.md` merge conflicts and mis-merges.

* At release time all you need to do to update the changelog is run
`scriv collect --version X.Y.Z`.

Scriv can also create GitHub releases, although I haven't evaluated this
feature yet.

Configure scriv so that its output format is the same as what we
currently use for our changelog. There are only a few minor differences:

* scriv prepends an HTML anchor to every version heading.

* scriv puts blank lines between list items (in CommonMark terms, the
lists are loose rather than tight).
  • Loading branch information
SpecLad authored Oct 6, 2023
1 parent ae1dc1b commit 551d28f
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ t
line. If you don't do that, GitHub will show incorrect progress for the pull request.
If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I submit my changes into the `develop` branch
- [ ] I have added a description of my changes into the [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file
- [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md -->
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](
Expand Down
52 changes: 7 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,16 @@ All notable changes to this project will be documented in this file.
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).

## \[Unreleased\]
<!--
Developers: this project uses scriv (<https://scriv.readthedocs.io/en/stable/index.html>)
to maintain the changelog. To add an entry, create a fragment:
### Added

- The latest comment displayed in issues sidebar (<https://github.com/opencv/cvat/pull/6937>)

### Changed

- TDB
$ scriv create --edit
### Deprecated
Fragments will be merged into this file whenever a release is made.
-->

- TDB

### Removed

- TDB

### Fixed

- It was not possible to copy issue comment from issue dialog (<https://github.com/opencv/cvat/pull/6937>)

### Security

- Update Grafana from 9.3.6 to 10.1.2
<!-- scriv-insert-here -->

## \[2.7.3\] - 2023-10-02

Expand Down Expand Up @@ -1766,26 +1751,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Initial version

## Template

```
## \[Unreleased]
### Added
- TDB
### Changed
- TDB
### Deprecated
- TDB
### Removed
- TDB
### Fixed
- TDB
### Security
- TDB
```
4 changes: 4 additions & 0 deletions changelog.d/fragment.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### {{ config.categories | join('|') }} <!-- pick one -->

- Describe your change here...
(<https://github.com/opencv/cvat/pull/XXXX>)
11 changes: 11 additions & 0 deletions changelog.d/legacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Added

- The latest comment displayed in issues sidebar (<https://github.com/opencv/cvat/pull/6937>)

### Fixed

- It was not possible to copy issue comment from issue dialog (<https://github.com/opencv/cvat/pull/6937>)

### Security

- Update Grafana from 9.3.6 to 10.1.2
6 changes: 6 additions & 0 deletions changelog.d/scriv.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[scriv]
categories = Added, Changed, Deprecated, Removed, Fixed, Security
entry_title_template = \[{{ version }}\] - {{ date.strftime('%%Y-%%m-%%d') }}
format = md
md_header_level = 2
new_fragment_template = file: fragment.j2

0 comments on commit 551d28f

Please sign in to comment.