From 1b057871be39b9092bdd834386b506fe84cff548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 8 Feb 2023 01:38:29 +0200 Subject: [PATCH 1/2] Expose addLabels, removeLabels via gitlab.utils --- source/dsl/GitLabDSL.ts | 2 ++ source/platforms/GitLab.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/dsl/GitLabDSL.ts b/source/dsl/GitLabDSL.ts index cb264c1b8..114732465 100644 --- a/source/dsl/GitLabDSL.ts +++ b/source/dsl/GitLabDSL.ts @@ -20,6 +20,8 @@ export interface GitLabJSONDSL { export interface GitLabDSL extends GitLabJSONDSL { utils: { fileContents(path: string, repoSlug?: string, ref?: string): Promise + addLabels(...labels: string[]): Promise + removeLabels(...labels: string[]): Promise } api: InstanceType } diff --git a/source/platforms/GitLab.ts b/source/platforms/GitLab.ts index 21316a582..5322918e6 100644 --- a/source/platforms/GitLab.ts +++ b/source/platforms/GitLab.ts @@ -227,6 +227,8 @@ export const gitlabJSONToGitLabDSL = (gl: GitLabDSL, api: GitLabAPI): GitLabDSL ...gl, utils: { fileContents: api.getFileContents, + addLabels: api.addLabels, + removeLabels: api.removeLabels, }, api: api.apiInstance, }) From 3526bf75d898473c9e8972914f935dd00d9a07b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 15 Feb 2023 14:38:10 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c159561f..e3e5e976e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ +- Feature: Expose addLabels, removeLabels via gitlab.utils, @glensc #1353 @@ -1964,6 +1965,7 @@ Not usable for others, only stubs of classes etc. - [@orta] [@fwal]: https://github.com/fwal [@g3offrey]: https://github.com/g3offrey [@gantman]: https://github.com/gantman +[@glensc]: https://github.com/glensc [@gpetrioli]: https:/github.com/gpetrioli [@gzaripov]: https://github.com/gzaripov [@hanneskaeufler]: https://github.com/hanneskaeufler