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

Signed-off-by: Sassoun Derderian <[email protected]>
  • Loading branch information
Sassoun Derderian committed Mar 24, 2020
1 parent 5dea830 commit a49e45d
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 a49e45d

Please sign in to comment.