Skip to content

Commit

Permalink
fix: creates a release from an existing tag
Browse files Browse the repository at this point in the history
Gitlab API doesn't allow to edit a tag, instead we create a new Release based on the given tag.

Fixes conventional-changelog#57
  • Loading branch information
Sassoun Derderian committed Mar 24, 2020
1 parent 5dea830 commit 541845f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/conventional-gitlab-releaser/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,11 @@ 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)}/repository/tags/${chunk.keyCommit.version}/release`
const options = {
endpoint: auth.url,
body: {
tag_name: chunk.keyCommit.version,
ref: chunk.keyCommit.hash,
message: 'Release ' + chunk.keyCommit.version,
release_description: chunk.log
description: chunk.log
}
}
debug(`posting %o to the following URL - ${url}`, options)
Expand Down

0 comments on commit 541845f

Please sign in to comment.