Skip to content

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 generate with --version specified.
  • Added a unit test for the new git.DescribeByTags function.
  • Tested manually by running glab changelog generate with:
    • --version unspecified
    • --version specified
    • --date specified as an invalid date
    • --date specified as a valid date
    • --trailer specified 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

Merge request reports

Loading