Skip to content

Add capabilities to enable gitlab-changelog to be used as a library

Georgi N. Georgiev requested to merge export-lib into master

What does this MR do?

Does some improvements to the changelog generation such as:

  • Option to overwrite current release so it can be regenerated without just appending it in the file
  • Updated Gitlab Client library
  • Remove --merges option so we can match cherry-picked merge commits
  • Many abstractions are removed as they were simply not needed, the code should be simpler and shorter now
  • Allow passing the changelog overwrite option as well as allowing to pass a list of MRs to generate changelog for instead of necessarily using the built in extractor

Why was this MR needed?

So it could be used within the automated release as a library while at the same time it would do the right thing when ran multiple times on the same branch/release

What's the best way to test this MR?

Generator tests should be comprehensive and should pass. In any case running make compile and then something along the lines of

./changelog -project-id 250833 \
		-release v1.1.1 \
		-starting-point-matcher "v[0-9]*.[0-9]*.[0-9]*" \
		-config-file .gitlab/changelog.yml \
		-changelog-file CHANGELOG.md

In some project (e.g. this one) should work

What are the relevant issue numbers?

Related to gitlab-org/gitlab-runner#29445

Edited by Georgi N. Georgiev

Merge request reports