Skip to content

Commit

Permalink
refactor(gitlab): use the releases api instead of deprecated tags api
Browse files Browse the repository at this point in the history
Creating release on `repository/tags` endpoint has been deprecated and marked for removal on gitlab.
This causes non-zero exit codes, therefore, breaking automatic CI pipelines. Fixes #204

BREAKING CHANGE: in Gitlab 14 the release notes creation via tags api is removed. It can be done with releases api, the minimum Gitlab version changed to 11.11.
Signed-off-by: Robert Oroszi <robert@oroszi.net>
  • Loading branch information
oroce committed Jun 17, 2021
1 parent d1f0821 commit 19da7d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/conventional-gitlab-releaser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Please use this [gist](https://gist.github.com/stevemao/280ef22ee861323993a0) to

### Required GitLab CE/EE Edition

Version [9.0](https://about.gitlab.com/2017/03/22/gitlab-9-0-released/#api-v4-ce-ees-eep), or higher, of GitLab CE/EE is required for `conventional-gitlab-releaser`.
Version [11.11](https://about.gitlab.com/releases/2019/05/22/gitlab-11-11-released), or higher, of GitLab CE/EE is required for `conventional-gitlab-releaser`.

Core features used:
* [GitLab release page](http://docs.gitlab.com/ce/workflow/releases.html)
Expand Down
6 changes: 3 additions & 3 deletions packages/conventional-gitlab-releaser/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ function conventionalGitlabReleaser (auth, changelogOpts, context, gitRawCommits
return
}

const url = `projects/${escape(context.owner + `/` + context.repository)}/repository/tags`
const url = `projects/${escape(context.owner + `/` + context.repository)}/releases`
const options = {
endpoint: auth.url,
body: {
tag_name: chunk.keyCommit.version,
ref: chunk.keyCommit.hash,
message: 'Release ' + chunk.keyCommit.version,
release_description: chunk.log
name: chunk.keyCommit.version,
description: chunk.log
}
}
debug(`posting %o to the following URL - ${url}`, options)
Expand Down

0 comments on commit 19da7d1

Please sign in to comment.