UNPKG

circleci-api

Version:

A Node and Browser client for the CircleCI API, written in TypeScript.

30 lines (29 loc) 1.52 kB
import { GitInfo, BuildActionResponse, TriggerBuildResponse, GitRequiredRequest, BuildAction, CircleOptions } from "../types"; /** * Commit a build action, returns a summary of the new build. * * Retry a build * @see https://circleci.com/docs/api/v1-reference/#retry-build * @example POST - /project/:vcs-type/:username/:project/:build_num/retry * * Cancel a build * @see https://circleci.com/docs/api/v1-reference/#cancel-build * @example POST - /project/:vcs-type/:username/:project/:build_num/cancel * * @param token - CircleCI API token * @param buildNumber - Target build number to retry * @param action - Action to perform on the build * @param circleHost Provide custom url for CircleCI * @param vcs - Project's git information that you'd like to retry */ export declare function postBuildActions(token: string, buildNumber: number, action: BuildAction, { circleHost, ...vcs }: GitInfo & CircleOptions): Promise<BuildActionResponse>; /** * Triggers a new build, returns a summary of the build. * @see https://circleci.com/docs/api/v1-reference/#new-build * @example /project/:vcs-type/:username/:project * * Triggers a new build, returns a summary of the build. * @see https://circleci.com/docs/api/v1-reference/#new-build-branch * @example /project/:vcs-type/:username/:project/tree/:branch */ export declare function postTriggerNewBuild(token: string, { circleHost, vcs, options: { branch, newBuildOptions } }: GitRequiredRequest): Promise<TriggerBuildResponse>;