feat: add new changelog command
Description
This MR adds a new changelog command. The changelog command is intended to interact with the GitLab changelog endpoint under the repository API. The only supported subcommand is changelog generate, which in turn can optionally take all the optional attributes that can be specified in the REST call. The only attribute that is required by the endpoint is the "version" attribute, which is now inferred from the output of running git describe.
Looking for suggestions on what additional tests should be added.
Related Issues
Resolves #1292 (closed)
How has this been tested?
- Added a unit test that calls
glab changelog generatewith--versionspecified. - Added a unit test for the new
git.DescribeByTagsfunction. - Tested manually by running
glab changelog generatewith:-
--versionunspecified -
--versionspecified -
--datespecified as an invalid date -
--datespecified as a valid date -
--trailerspecified as a non-default trailer (i.e.Signed-off-by).
-
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Michael Mead