UNPKG

@atomist/automation-client

Version:

Atomist API for software low-level client

35 lines 2.05 kB
import { HandlerContext } from "../../HandlerContext"; import { GitProject } from "../../project/git/GitProject"; import { Project } from "../../project/Project"; import { EditorOrReviewerParameters } from "../common/params/BaseEditorOrReviewerParameters"; import { BranchCommit, EditMode, PullRequest } from "../edit/editModes"; import { EditResult, ProjectEditor } from "../edit/projectEditor"; /** * Edit a GitHub project using a PR or branch. * Do not attempt any git updates if (a) edited is explicitly set to false by the editor * or (b) edited is undefined and git status is not dirty. If edited is explicitly * set to true by the editor and the git status is not dirty, this is a developer error * which should result in a runtime error. * @param context handler context for this operation * @param p project * @param editor editor to use * @param editMode how to persist the edit * @param parameters to editor * @return EditResult instance that reports as to whether the project was actually edited */ export declare function editRepo<P extends EditorOrReviewerParameters>(context: HandlerContext, p: Project, editor: ProjectEditor<P>, editMode: EditMode, parameters?: P): Promise<EditResult>; export declare function editProjectUsingPullRequest<P>(context: HandlerContext, gp: GitProject, editor: ProjectEditor<P>, pr: PullRequest, parameters?: P): Promise<EditResult>; export declare function editProjectUsingBranch<P>(context: HandlerContext, gp: GitProject, editor: ProjectEditor<P>, ci: BranchCommit, parameters?: P): Promise<EditResult>; /** * Create a branch (if it doesn't exist), commit with current content and push * @param {GitProject} gp * @param {BranchCommit} ci */ export declare function createAndPushBranch(gp: GitProject, ci: BranchCommit): Promise<EditResult>; /** * Raise a PR from the current state of the project * @param {GitProject} gp * @param {PullRequest} pr */ export declare function raisePr(gp: GitProject, pr: PullRequest): Promise<EditResult>; //# sourceMappingURL=editorUtils.d.ts.map