Skip to content

Commit

Permalink
feat: update labels on update merge request (#192)
Browse files Browse the repository at this point in the history
Co-authored-by: JounQin <[email protected]>
  • Loading branch information
Tchoupinax and JounQin authored Oct 7, 2024
1 parent 31fb0bc commit a557b95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-phones-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'changesets-gitlab': patch
---

feat: update labels on update merge request
9 changes: 6 additions & 3 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ export async function runVersion({
await exec('git', ['fetch', 'origin', currentBranch])
await gitUtils.reset(`origin/${currentBranch}`)

const labels = getOptionalInput('labels')
?.split(',')
.map(x => x.trim())

const versionsByDirectory = await getVersionsByDirectory(cwd)

if (script) {
Expand Down Expand Up @@ -313,9 +317,7 @@ ${
{
description: await mrBodyPromise,
removeSourceBranch,
labels: getOptionalInput('labels')
?.split(',')
.map(x => x.trim()),
labels,
},
)
} else {
Expand All @@ -324,6 +326,7 @@ ${
title: finalMrTitle,
description: await mrBodyPromise,
removeSourceBranch,
labels,
})
}
}

0 comments on commit a557b95

Please sign in to comment.