This commit is contained in:
2026-01-12 03:16:35 +08:00
parent c2dcc53018
commit 5310ff28ae
48 changed files with 1349 additions and 254 deletions

View File

@@ -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',