Skip to content

Commit

Permalink
feat: support custom labels on Gitlab Merge Request (#180)
Browse files Browse the repository at this point in the history
Co-authored-by: bert.degeyter <bert.degeyter@showpad.com>
  • Loading branch information
TheHolyWaffle and bert.degeyter authored May 20, 2024
1 parent 54e3175 commit 3678f85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-ladybugs-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'changesets-gitlab': minor
---

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

### Outputs

Expand Down
8 changes: 6 additions & 2 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import * as context from './context.js'
import * as gitUtils from './gitUtils.js'
import readChangesetState from './readChangesetState.js'
import {
getChangelogEntry,
execWithOutput,
getChangedPackages,
sortTheThings,
getChangelogEntry,
getOptionalInput,
getVersionsByDirectory,
sortTheThings,
} from './utils.js'

import { createApi } from './index.js'
Expand Down Expand Up @@ -312,6 +313,9 @@ ${
{
description: await mrBodyPromise,
removeSourceBranch,
labels: getOptionalInput('labels')
?.split(',')
.map(x => x.trim()),
},
)
} else {
Expand Down

0 comments on commit 3678f85

Please sign in to comment.