Skip to content

Script to create a Changelog.md entry from files in .changelog#1447

Draft
j-rivero wants to merge 2 commits intomasterfrom
jrivero/create_changelog_entry2
Draft

Script to create a Changelog.md entry from files in .changelog#1447
j-rivero wants to merge 2 commits intomasterfrom
jrivero/create_changelog_entry2

Conversation

@j-rivero
Copy link
Contributor

Follow up of #1335 , Part of #246.

The script consumes entries in the a .changelog/ directory containing files using a conventional commit text sentence and generates a Changelog.md modification and made a commit for it.

A testing run on gz-test would look like:

gz-test on  main [⇡] via △ v3.28.3 ❯ ~/code/release-tools2/source-repo-scripts/create_changelog_entry.py 
Reading changelog entries from /home/jrivero/code/gz/gz-test/.changelog...
Found commit SHA: 0da68529bda8739b2c7cef8231e063bb57e5ba3e for file my_feature1.md
Found PR #3 for commit 0da68529bda8739b2c7cef8231e063bb57e5ba3e
Found commit SHA: 26b1ab64abf66d57164d8bdb10a8e851827c88f1 for file update-license.md
Found PR #2 for commit 26b1ab64abf66d57164d8bdb10a8e851827c88f1
Generating changelog entry...
Calculated next version: 0.1.0
Generated changelog entry:
--------------------------------------------------
## Gazebo Test 0.1.0 (2026-02-18)

* feat: Support for the new feature 1 in all the components
      * [Pull request #3](https://github.com/gazebosim/gz-test/pull/3)
* fix: Update license years from 2012 to 2025
      * [Pull request #2](https://github.com/gazebosim/gz-test/pull/2)

--------------------------------------------------
Update Changelog.md with this entry? (y/N): 

Final result:

gz-test on  main [✘!⇡] via △ v3.28.3 ❯ git diff
diff --git a/Changelog.md b/Changelog.md
index 49190a0..ef47b15 100755
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,3 +1,11 @@
 ## Gazebo Test 0.x
 
+## Gazebo Test 0.1.0 (2026-02-18)
+
+* feat: Support for the new feature 1 in all the components
+      * [Pull request #3](https://github.com/gazebosim/gz-test/pull/3)
+* fix: Update license years from 2012 to 2025
+      * [Pull request #2](https://github.com/gazebosim/gz-test/pull/2)
+
+
 ## Gazebo Test 0.0.0 (2022-01-01)
gz-test on  main [✘!⇡] via △ v3.28.3 ❯ git status
On branch main
Your branch is ahead of 'origin/main' by 2 commits.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	deleted:    .changelog/my_feature1.md
	deleted:    .changelog/update-license.md

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   Changelog.md

TODO: add the commit feature

Generated-by: Opus 4.6
Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.com>
Signed-off-by: Jose Luis Rivero <jrivero@honurobotics.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.

1 participant