fix(module): be selective about gitlab client options
This commit is contained in:
parent
b26fb78ff7
commit
be153a8149
|
@ -15,9 +15,10 @@ export class RemoteModule extends Module {
|
|||
}
|
||||
|
||||
@Provides(INJECT_GITLAB)
|
||||
public async createGitlab(options: GitlabOptions, ...others: Array<unknown>) {
|
||||
/* eslint-disable-next-line */
|
||||
console.log('inject', options, others);
|
||||
return new Gitlab(options);
|
||||
public async createGitlab(options: GitlabOptions) {
|
||||
return new Gitlab({
|
||||
host: options.host,
|
||||
token: options.token,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { mustExist } from '@apextoaster/js-utils';
|
||||
import { Gitlab } from '@gitbeaker/node';
|
||||
import { BaseOptions } from 'noicejs';
|
||||
|
||||
import { CommentUpdate, IssueUpdate, LabelUpdate, ProjectQuery, Remote, RemoteOptions } from '.';
|
||||
import { BaseRemote } from './base';
|
||||
|
@ -13,7 +14,7 @@ const client = new Gitlab({});
|
|||
|
||||
export const INJECT_GITLAB = Symbol('inject-gitlab');
|
||||
|
||||
export interface GitlabOptions {
|
||||
export interface GitlabOptions extends BaseOptions {
|
||||
host: string;
|
||||
token: string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue