update
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
import { CNBCore, CNBCoreOptions, RequestOptions, Result } from "../cnb-core.ts";
|
||||
|
||||
type Options = CNBCoreOptions<{
|
||||
group?: string;
|
||||
}>
|
||||
|
||||
export class Build extends CNBCore {
|
||||
group: string;
|
||||
constructor(options: Options) {
|
||||
constructor(options: CNBCoreOptions ) {
|
||||
super({ token: options.token, cookie: options.cookie });
|
||||
this.group = options.group || '';
|
||||
}
|
||||
startBuild(repo: string, data: StartBuildData): Promise<any> {
|
||||
const group = this.group || '';
|
||||
const url = `/${group}/${repo}/-/build/start`;
|
||||
const url = `/${repo}/-/build/start`;
|
||||
let postData: StartBuildData = {
|
||||
...data,
|
||||
branch: data.branch || 'main',
|
||||
|
||||
Reference in New Issue
Block a user