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

build: Add git-cliff support for changelog generation #1825

Merged
merged 7 commits into from Apr 9, 2024
Merged

Conversation

rprospero
Copy link
Contributor

@rprospero rprospero commented Mar 22, 2024

DO NOT MERGE WITHOUT WARNING THE REST OF THE TEAM

This PR adds a check to the CI that will enforce the use of Conventional Commits when submitting a PR. A pull request template is included to remind developers to include an appropriate title for their PR.

As a final change, the changeversion script is updated to automatically pull the next version number from git cliff --bump. This also means that it is no longer necessary (or possible) to pass the desired version type to the script.

Check for feat tag

Check for build tag

Better quotes

Check for all our conventional commits

Officially recognise build section in changelog

Update docs for conventional commits
@rprospero rprospero added this to the Release 1.5 milestone Mar 22, 2024
@rprospero rprospero added the 8 DIfficulty: 8 label Mar 22, 2024
@trisyoungs trisyoungs requested a review from Danbr4d April 3, 2024 08:36
Copy link
Contributor

@rhinoella rhinoella left a comment

Choose a reason for hiding this comment

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

👍

@trisyoungs trisyoungs requested a review from jws-1 April 5, 2024 12:03
@trisyoungs
Copy link
Member

See also #1834.

Copy link
Member

@jws-1 jws-1 left a comment

Choose a reason for hiding this comment

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

Couple of minor comments, but looks good to me - I'm a big fan of Conventional Commits.

web/docs/userguide/developers/contributing.md Show resolved Hide resolved
web/docs/userguide/developers/releases.md Outdated Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md Outdated Show resolved Hide resolved
@rprospero
Copy link
Contributor Author

@trisyoungs That is a very valid question. My updated changeversion script can only be run on the Release branch (since that would be the branch with all of the version tags and the correct version history). You comment now makes me concerned that we need two separate scripts, one for the release branch and one for the develop branch. The ci setup would have to be as follows

  1. release-version script is run on release branch, updating the appropriate files on that branch.
  2. CI reads files on release branch to learn the new version number, then pipes that in as a parameter to the develop-version script on the develop branch.

Comment on lines +71 to +72
r) BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" != "Release" ]
Copy link
Member

Choose a reason for hiding this comment

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

Is this right? If I run this on a release branch I get, for example, release/1.4.3 which wouldn't satisfy the test...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm specifically creating a branch named Release, since release was already taken. It is only on that branch that the test will pass.

@rprospero rprospero merged commit ebf30a9 into develop Apr 9, 2024
11 checks passed
@rprospero rprospero deleted the cliff-tools branch April 9, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8 DIfficulty: 8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants