@@ -8,19 +8,20 @@ module.exports = async (pluginConfig, {options: {repositoryUrl}, nextRelease: {g
88 const { gitlabToken, gitlabUrl, gitlabApiPathPrefix} = resolveConfig ( pluginConfig ) ;
99 const repoId = getRepoId ( gitlabUrl , repositoryUrl ) ;
1010 const apiUrl = urlJoin ( gitlabUrl , gitlabApiPathPrefix ) ;
11+ const gitTagEncoded = encodeURIComponent ( gitTag ) ;
1112
1213 debug ( 'repoId: %o' , repoId ) ;
1314 debug ( 'release name: %o' , gitTag ) ;
1415 debug ( 'release ref: %o' , gitHead ) ;
1516
1617 debug ( 'Update git tag %o with commit %o and release description' , gitTag , gitHead ) ;
17- await got . post ( urlJoin ( apiUrl , `/projects/${ encodeURIComponent ( repoId ) } /repository/tags/${ gitTag } /release` ) , {
18+ await got . post ( urlJoin ( apiUrl , `/projects/${ encodeURIComponent ( repoId ) } /repository/tags/${ gitTagEncoded } /release` ) , {
1819 json : true ,
1920 headers : { 'PRIVATE-TOKEN' : gitlabToken } ,
2021 body : { tag_name : gitTag , description : notes } , // eslint-disable-line camelcase
2122 } ) ;
2223
2324 logger . log ( 'Published GitLab release: %s' , gitTag ) ;
2425
25- return { url : urlJoin ( gitlabUrl , repoId , `/tags/${ gitTag } ` ) , name : 'GitHub release' } ;
26+ return { url : urlJoin ( gitlabUrl , repoId , `/tags/${ gitTagEncoded } ` ) , name : 'GitHub release' } ;
2627} ;
0 commit comments