Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve changelog by using git-cliff #768

Merged
merged 15 commits into from
Oct 10, 2024
Merged

Conversation

vjousse
Copy link
Collaborator

@vjousse vjousse commented Sep 24, 2024

🔧 Problem

We can't customize the changelog generated by release-please, so it's impossible to filter technical and non technical changes.

Moreover only fix and feat commits are parts of the changelog, sometimes it would make sense to add chore, refactor and doc changes to the changelog.

🍰 Solution

Use git-cliff to generate the changelog and create the tags too. The process is the same than with release-please, it will create an automated PR that, when merged, will tag the appropriate version and create a release.

🚨 Points to watch/comments

Commits that are only relative to data/ are excluded from the changelog.

We will be able to fully test this PR only once it will be merged into master and once a release will be created. I did all the tests that I could without merging, see below.

🏝️ How to test

The generated PR will look like this one: #797

Important

This automated PR was updated using the commits of this PR, so once this is merged into master, the changelog will only contain the squashed commits of the master branch.

The different workflows were tested extensively here: https://github.com/vjousse/git-cliff-release-creation-exemple

I did a test on this PR by enabling release creation on commit push here (instead of merging the changelog PR). The tag and the release (configured as draft in my test) was created as expected, see the screenshots below.

Screenshot 2024-10-09 at 15-53-53 Tags · MTES-MCT_ecobalyse
Screenshot 2024-10-09 at 15-53-32 Releases · MTES-MCT_ecobalyse

I have removed the tag and the draft PR since.

@vjousse vjousse force-pushed the chore/improve-changelog branch 3 times, most recently from 79c5299 to 1283e08 Compare September 26, 2024 09:50
@vjousse vjousse force-pushed the chore/improve-changelog branch 2 times, most recently from 33e704b to 11f8e9e Compare September 26, 2024 13:45
vjousse added a commit that referenced this pull request Sep 26, 2024
## 🔧 Problem

When deploying on scalingo we download all releases without checking if
it's a draft one, it may cause problems if we want to use the draft
functionality of releases to use `git-cliff` for example
#768.

## 🍰 Solution

Filter out releases that are draft.


## 🏝️ How to test

The deploy to scalingo of this PR should download 11 releases and not
more (we currently have 11 releases and some drafts).
@vjousse vjousse force-pushed the chore/improve-changelog branch 4 times, most recently from c99829b to 6fa522a Compare October 8, 2024 09:47
@vjousse vjousse marked this pull request as ready for review October 9, 2024 08:58
@vjousse vjousse changed the title feat: improve changelog by using git-cliff chore: improve changelog by using git-cliff Oct 9, 2024
@vjousse vjousse requested review from n1k0 and ccomb October 9, 2024 15:14
Copy link
Member

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, final validation will occur when this is landed onto master I guess

.github/workflows/create_pr_for_changelog.yml Show resolved Hide resolved
.github/workflows/create_pr_for_changelog.yml Outdated Show resolved Hide resolved
cliff.toml Outdated
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: May I suggest 🪲 as it's what's already used in Notion, for consistency?

@vjousse vjousse merged commit 89de82b into master Oct 10, 2024
5 checks passed
@vjousse vjousse deleted the chore/improve-changelog branch October 10, 2024 09:34
vjousse pushed a commit that referenced this pull request Oct 10, 2024
## [2.4.0](https://github.com/MTES-MCT/ecobalyse/compare/v2.3.0..v2.4.0)
(2024-10-10)



### 🚀 Features

- Introduce first version of object interface
([#756](#756))

### 🪲 Bug Fixes

- Sync food ([#759](#759))
- Don't hide version information on staging
([#778](#778))
- Reset physical durablility in regulatory mode
([#786](#786))
- *(api,food)* Nullable fields weren't nullable anymore.
([#789](#789))

### 🚜 Refactor

- Small textile explorer improvements
([#773](#773))

### ⚙️ Miscellaneous Tasks

- Don't download draft releases
([#771](#771))
- Remove `airTransportRatio` from examples
([#785](#785))
- Cleanup package-lock.json.
([#787](#787))
- Use builtin python action cache for pipenv
([#796](#796))
- Improve changelog by using `git-cliff`
([#768](#768))

<!-- generated by git-cliff -->

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants