File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { runPublish, runVersion } from './run.js'
10
10
import { MainCommandOptions } from './types.js'
11
11
import { execSync } from './utils.js'
12
12
13
+ const getOptionalInput = ( name : string ) => getInput ( name ) || undefined
14
+
13
15
export const main = async ( {
14
16
published,
15
17
onlyChangesets,
@@ -93,10 +95,10 @@ export const main = async ({
93
95
}
94
96
case hasChangesets : {
95
97
await runVersion ( {
96
- script : getInput ( 'version' ) ,
98
+ script : getOptionalInput ( 'version' ) ,
97
99
gitlabToken : GITLAB_TOKEN ! ,
98
- prTitle : getInput ( 'title' ) ,
99
- commitMessage : getInput ( 'commit' ) ,
100
+ prTitle : getOptionalInput ( 'title' ) ,
101
+ commitMessage : getOptionalInput ( 'commit' ) ,
100
102
hasPublishScript,
101
103
} )
102
104
if ( onlyChangesets ) {
Original file line number Diff line number Diff line change 268
268
. map ( x => x . content )
269
269
. join ( '\n ' ) ) ( )
270
270
271
- const finalPrTitle = `${ prTitle } ${ preState ? ` (${ preState . tag } )` : '' } `
271
+ const finalMrTitle = `${ prTitle } ${ preState ? ` (${ preState . tag } )` : '' } `
272
272
273
273
// project with `commit: true` setting could have already committed files
274
274
if ( ! ( await gitUtils . checkIfClean ( ) ) ) {
290
290
} )
291
291
console . log ( JSON . stringify ( searchResult , null , 2 ) )
292
292
if ( searchResult . length === 0 ) {
293
- console . log ( 'creating pull request' )
293
+ console . log ( 'creating merge request' )
294
294
await api . MergeRequests . create (
295
295
context . projectId ,
296
296
versionBranch ,
297
297
branch ,
298
- finalPrTitle ,
298
+ finalMrTitle ,
299
299
{
300
300
description : await prBodyPromise ,
301
301
} ,
302
302
)
303
303
} else {
304
304
await api . MergeRequests . edit ( context . projectId , searchResult [ 0 ] . iid , {
305
- title : finalPrTitle ,
305
+ title : finalMrTitle ,
306
306
description : await prBodyPromise ,
307
307
} )
308
- console . log ( 'pull request found' )
308
+ console . log ( 'merge request found' )
309
309
}
310
310
}
You can’t perform that action at this time.
0 commit comments