Skip to content

Commit a557b95

Browse files
TchoupinaxJounQin
andauthored
feat: update labels on update merge request (#192)
Co-authored-by: JounQin <admin@1stg.me>
1 parent 31fb0bc commit a557b95

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.changeset/green-phones-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'changesets-gitlab': patch
3+
---
4+
5+
feat: update labels on update merge request

src/run.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ export async function runVersion({
216216
await exec('git', ['fetch', 'origin', currentBranch])
217217
await gitUtils.reset(`origin/${currentBranch}`)
218218

219+
const labels = getOptionalInput('labels')
220+
?.split(',')
221+
.map(x => x.trim())
222+
219223
const versionsByDirectory = await getVersionsByDirectory(cwd)
220224

221225
if (script) {
@@ -313,9 +317,7 @@ ${
313317
{
314318
description: await mrBodyPromise,
315319
removeSourceBranch,
316-
labels: getOptionalInput('labels')
317-
?.split(',')
318-
.map(x => x.trim()),
320+
labels,
319321
},
320322
)
321323
} else {
@@ -324,6 +326,7 @@ ${
324326
title: finalMrTitle,
325327
description: await mrBodyPromise,
326328
removeSourceBranch,
329+
labels,
327330
})
328331
}
329332
}

0 commit comments

Comments
 (0)