Too many items in the changelog: catkin_generat_changelog certainly helps making the complete list of changes. Problem is listing commits description of all commits isn't helpful in some/many cases unless commit history is well-made with very meaningful chunks with descriptive commit message. Even so, commit history may be more for developers, so in product development where non-developers need changelog, only top-level description of the changes (Bugfix? New capability? etc.) are needed and figuring out top-level change from the list of commit messages is difficult (particularly when the maintainer who's making the changelog is not the one that made or reviewed all the commits).
Solution taken in this PR
Add an option to show only the commits made by MR/PRs.
List the messages from only merge commits when they are present, in the changelog.
catkin_generate_changelog can list merge commits (I confirmed for Git{Hub, Lab}), with the link to a merge/pull request if available (example posted below). This makes easier for a maintainer to describe the changes, and with a link it's easier to track down the change on the online repository.
Merge branch 'branch-a' into 'develop'
disabled X by default
See merge request org/org-sub/org-sub-sub/repo!97
Open question
Unit test missing for this new option.
The new option involves git to run, and I haven't been able to think of a way to test that involves git operation, without cloning an external repo during the test. Looked into the test folder and there's no test cases yet that test vcs operation. That said, if unit test is absolutely needed, I appreciate if someone can provide ideas how to achieve it.
Example output
# catkin_generate_changelog --only-merges
Querying commit information since latest tag...
Updating forthcoming section of changelog files...
- updating 'b_data_collection/CHANGELOG.rst'
- updating 'b_sensor/b_asus/CHANGELOG.rst'
:
Done.
# git diff
:
diff --git a/b_support/CHANGELOG.rst b/b_support/CHANGELOG.rst
index ca6571b..6663858 100644
--- a/b_support/CHANGELOG.rst
+++ b/b_support/CHANGELOG.rst
@@ -2,6 +2,22 @@
Changelog for package b_support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Forthcoming
+-----------
+* Merge branch 'feature-enable-redundancy' into 'develop'
+ Feature enable redundancy
+ See merge request `plusone-robotics/b/b_tools!265 <https://gitlab.com/plusone-robotics/b/b_tools/-/merge_requests/265>`_
+* Merge branch 'feature-standardize-background-init-wait' into 'develop'
+ Feature standardize background init wait
+ See merge request `plusone-robotics/b/b_tools!263 <https://gitlab.com/plusone-robotics/b/b_tools/-/merge_requests/263>`_
+* Merge branch 'synch-master-dev-post350' into 'develop'
+ Synch master -> develop post 3.5.0
+ See merge request `plusone-robotics/b/b_tools!262 <https://gitlab.com/plusone-robotics/b/b_tools/-/merge_requests/262>`_
+* Merge branch 'release_3.5.0' into 'master'
+ Release 3.5.0
+ See merge request `plusone-robotics/b/b_tools!261 <https://gitlab.com/plusone-robotics/b/b_tools/-/merge_requests/261>`_
+
Problem this PR aims to solve
Too many items in the changelog:
catkin_generat_changelog
certainly helps making the complete list of changes. Problem is listing commits description of all commits isn't helpful in some/many cases unless commit history is well-made with very meaningful chunks with descriptive commit message. Even so, commit history may be more for developers, so in product development where non-developers need changelog, only top-level description of the changes (Bugfix? New capability? etc.) are needed and figuring out top-level change from the list of commit messages is difficult (particularly when the maintainer who's making the changelog is not the one that made or reviewed all the commits).Solution taken in this PR
Add an option to show only the commits made by MR/PRs.
List the messages from only merge commits when they are present, in the changelog.
catkin_generate_changelog can list merge commits (I confirmed for Git{Hub, Lab}), with the link to a merge/pull request if available (example posted below). This makes easier for a maintainer to describe the changes, and with a link it's easier to track down the change on the online repository.
Open question
git
to run, and I haven't been able to think of a way to test that involvesgit
operation, without cloning an external repo during the test. Looked into the test folder and there's no test cases yet that test vcs operation. That said, if unit test is absolutely needed, I appreciate if someone can provide ideas how to achieve it.Example output
Without this option,
CC @aaronplusone