Skip to content

Commit 3678f85

Browse files
TheHolyWafflebert.degeyter
andauthored
feat: support custom labels on Gitlab Merge Request (#180)
Co-authored-by: bert.degeyter <bert.degeyter@showpad.com>
1 parent 54e3175 commit 3678f85

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.changeset/four-ladybugs-teach.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'changesets-gitlab': minor
3+
---
4+
5+
Allow adding custom labels to the version package Gitlab Merge Request

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ GitLab CI cli for [changesets](https://github.com/atlassian/changesets) like its
3030
- `INPUT_REMOVE_SOURCE_BRANCH` - Enables the merge request "Delete source branch" checkbox. Default false.
3131
- `INPUT_TARGET_BRANCH` -> The merge request target branch. Defaults to current branch
3232
- `INPUT_CREATE_GITLAB_RELEASES` - A boolean value to indicate whether to create Gitlab releases after publish or not. Default true.
33+
- `INPUT_LABELS` - A comma separated string of labels to be added to the version package Gitlab Merge request
3334

3435
### Outputs
3536

src/run.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import * as context from './context.js'
1313
import * as gitUtils from './gitUtils.js'
1414
import readChangesetState from './readChangesetState.js'
1515
import {
16-
getChangelogEntry,
1716
execWithOutput,
1817
getChangedPackages,
19-
sortTheThings,
18+
getChangelogEntry,
19+
getOptionalInput,
2020
getVersionsByDirectory,
21+
sortTheThings,
2122
} from './utils.js'
2223

2324
import { createApi } from './index.js'
@@ -312,6 +313,9 @@ ${
312313
{
313314
description: await mrBodyPromise,
314315
removeSourceBranch,
316+
labels: getOptionalInput('labels')
317+
?.split(',')
318+
.map(x => x.trim()),
315319
},
316320
)
317321
} else {

0 commit comments

Comments
 (0)