diff --git a/CHANGELOG.md b/CHANGELOG.md index d117be6f6..4376cabc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ +- Feature: Expose addLabels, removeLabels via gitlab.utils, @glensc #1353 - Fix remote dangerfiles always parsing as JavaScript. TypeScript files should now work properly. - [@snowe2010] - Add support for BitBucket Cloud Repository Access Token - [@thawankeane] @@ -1966,6 +1967,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 diff --git a/source/dsl/GitLabDSL.ts b/source/dsl/GitLabDSL.ts index e517efb4b..3bdcfb199 100644 --- a/source/dsl/GitLabDSL.ts +++ b/source/dsl/GitLabDSL.ts @@ -19,6 +19,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 7c9ebfecf..6af3d6135 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, })