@atomist/automation-client
Version:
Atomist API for software low-level client
45 lines • 2.19 kB
TypeScript
import { ActionResult } from "../../action/ActionResult";
import { Configurable } from "../../project/git/Configurable";
import { ProjectOperationCredentials } from "./ProjectOperationCredentials";
import { ProviderType, RemoteRepoRef } from "./RepoId";
/**
* Superclass for RemoteRepoRef implementations.
* Handles parsing remote base
*
* This should ultimately move down to automation-client-ts and replace AbstractRepoRef.
*/
export declare abstract class AbstractRemoteRepoRef implements RemoteRepoRef {
readonly providerType: ProviderType;
readonly owner: string;
readonly repo: string;
readonly sha: string;
readonly path?: string;
branch?: string;
readonly scheme: "http://" | "https://";
readonly apiBase: string;
/**
* Remote url not including scheme or trailing /
*/
readonly remoteBase: string;
/**
* Construct a new RemoteRepoRef
* @param {ProviderType} providerType
* @param {string} rawRemote remote url, like for cloning or linking into the repo. Should start with a scheme.
* May have a trailing slash, which will be stripped
* @param rawApiBase raw API base url. Should start with a scheme.
* May have a trailing slash, which will be stripped
* @param {string} owner
* @param {string} repo
* @param {string} sha
* @param {string} path
*/
protected constructor(providerType: ProviderType, rawRemote: string, rawApiBase: string, owner: string, repo: string, sha?: string, path?: string);
readonly url: string;
cloneUrl(creds: ProjectOperationCredentials): string;
readonly pathComponent: string;
abstract createRemote(creds: ProjectOperationCredentials, description: string, visibility: any): Promise<ActionResult<this>>;
abstract setUserConfig(credentials: ProjectOperationCredentials, project: Configurable): Promise<ActionResult<any>>;
abstract raisePullRequest(creds: ProjectOperationCredentials, title: string, body: string, head: string, base: string): Promise<ActionResult<this>>;
abstract deleteRemote(creds: ProjectOperationCredentials): Promise<ActionResult<this>>;
}
//# sourceMappingURL=AbstractRemoteRepoRef.d.ts.map