import { ActionResult } from "../../action/ActionResult"; import { RemoteRepoRef } from "../../operations/common/RepoId"; import { LocalProject } from "../local/LocalProject"; import { Configurable } from "./Configurable"; import { GitStatus } from "./gitStatus"; /** * Git push options. See git-push(1) for more information. */ export interface GitPushOptions { follow_tags?: boolean; force?: boolean; force_with_lease?: boolean | string; quiet?: boolean; verbose?: boolean; } /** * Local project using git. Provides the ability to perform git operations * such as commit, and to set and push to a remote. */ export interface GitProject extends LocalProject, Configurable { branch: string; remote: string; newRepo: boolean; /** * Init git for this project. */ init(): Promise>; /** * Get some status information */ gitStatus(): Promise; /** * Remote is of form https://github.com/USERNAME/REPOSITORY.git * @param remote */ setRemote(remote: string): Promise>; /** * Sets the given user and email as the running git commands * @param {string} user * @param {string} email */ setUserConfig(user: string, email: string): Promise>; /** * Sets the user config by using GitHub user information. Make sure to use a token that * has user scope. */ configureFromRemote(): Promise>; /** * Does the project have uncommitted changes in Git? Success means it's clean */ isClean(): Promise>; /** * Create a remote repository and set this repository's remote to it. * @param gid: RemoteRepoRef * @param {string} description * @param {"private" | "public"} visibility */ createAndSetRemote(gid: RemoteRepoRef, description: string, visibility: "private" | "public"): Promise>; /** * Raise a PR after a push to this branch * @param title * @param body */ raisePullRequest(title: string, body: string): Promise>; /** * Commit to local git * @param {string} message */ commit(message: string): Promise>; /** * Check out a particular commit. We'll end in detached head state * @param sha sha or branch identifier */ checkout(sha: string): Promise>; /** * Revert all changes since last commit */ revert(): Promise>; /** * Push to the remote. */ push(options?: GitPushOptions): Promise>; /** * Create a new branch and switch to it. * @param {string} name Name of the new branch */ createBranch(name: string): Promise>; /** * Check for existence of a branch */ hasBranch(name: string): Promise; } //# sourceMappingURL=GitProject.d.ts.map