A Gitlab release note generator that generates release note on latest tag
-
Generate release note on the latest tag based on merge requests and issues
-
Distinguished title with issues or merge requests that have the following labels: enhancement, breaking change, feature and bug
(Note. if an issue or merge request that has 2 or more labels, that issue or merge request will be displayed again under the corresponding title)
-
Can be integrated as a CD service. Tutorial below
- Find the latest tag
- Find the previous tag that is on the same branch as the latest tag.
- Locate the date range between the latest and the previous tag. If there is only a tag in the project, then the
from
date will be the project creation date and theto
date will be that tag's creation date. - Find all Merged merge requests and Closed issues within that time range
- Generate a release note/changelog based on the findings above.
- NodeJS ^10.x.x OR docker
- A gitlab personal access token with
api
permission. How to Tutorial
docker container run -e GITLAB_PERSONAL_TOKEN=gitlabSampleToken -e GITLAB_PROJECT_ID=12345678 -e TARGET_BRANCH=sampleTargetBranch -e TARGET_TAG_REGEX=sampleRegex 00freezy00/gitlab-release-note-generator
- Fill in the parameters mainly
GITLAB_PERSONAL_TOKEN
,GITLAB_PROJECT_ID
,TARGET_BRANCH
(optional. Use it only if you want to find tags in the same specific branch) andTARGET_TAG_REGEX
(optional. Can use it to distinguish master or develop branch version bump) inapp/env.js
or feed it inprocess.env
through npm npm install
npm start
- After couple seconds, latest tag should have a release note
-
Need to pass in
gitlab personal access token
as a CI variable -
c/p the
.sample.gitlab-ci.yml
to your gitlab ci.What's included in the sample gitlab CI script
generate-release-note
job. Generates a release note on the tag after detecting tag push with this regex/^[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?$/
tag-after-deployment
job (optional). Tag the commit that contains a version bump with this regex/^[0-9]+.[0-9]+.[0-9]+(-[0-9]+)?$/
. Require ssh key to work.
-
Customise the gitlab ci script to your need
Reference gitlab repo: generator test
- Release notes generation on selected tag
- Customise template for the release note
Thanks to github-changelog-generator for inspiring me to make this app. Sorry, I couldn't wait any longer for that gitlab feature to be merged in.