File tree 1 file changed +20
-14
lines changed
1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -68,22 +68,28 @@ module.exports = async (pluginConfig, context) => {
68
68
}
69
69
70
70
debug ( 'Create a release for git tag %o with commit %o' , gitTag , gitHead ) ;
71
+
72
+ const json = {
73
+ /* eslint-disable camelcase */
74
+ tag_name : gitTag ,
75
+ description : notes && notes . trim ( ) ? notes : gitTag ,
76
+ assets : {
77
+ links : assetsList . map ( ( { label, alt, url} ) => {
78
+ return {
79
+ name : label || alt ,
80
+ url : urlJoin ( gitlabUrl , repoId , url ) ,
81
+ } ;
82
+ } ) ,
83
+ } ,
84
+ /* eslint-enable camelcase */
85
+ } ;
86
+
87
+ logger . log ( 'About to POST the following JSON to /releases:' ) ;
88
+ logger . log ( JSON . stringify ( json , null , 2 ) ) ;
89
+
71
90
await got . post ( urlJoin ( gitlabApiUrl , `/projects/${ encodedRepoId } /releases` ) , {
72
91
...apiOptions ,
73
- json : {
74
- /* eslint-disable camelcase */
75
- tag_name : gitTag ,
76
- description : notes && notes . trim ( ) ? notes : gitTag ,
77
- assets : {
78
- links : assetsList . map ( ( { label, alt, url} ) => {
79
- return {
80
- name : label || alt ,
81
- url : urlJoin ( gitlabUrl , repoId , url ) ,
82
- } ;
83
- } ) ,
84
- } ,
85
- /* eslint-enable camelcase */
86
- } ,
92
+ json,
87
93
} ) ;
88
94
89
95
logger . log ( 'Published GitLab release: %s' , gitTag ) ;
You can’t perform that action at this time.
0 commit comments