@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
35 lines • 1.5 kB
TypeScript
import { BitBucketServerRepoRef } from "@atomist/automation-client/lib/operations/common/BitBucketServerRepoRef";
import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
import { SdmGoalEvent } from "../../../api/goal/SdmGoalEvent";
import { RepoRefResolver } from "../../../spi/repo-ref/RepoRefResolver";
import { CoreRepoFieldsAndChannels, OnPushToAnyBranch } from "../../../typings/types";
export declare class DefaultRepoRefResolver implements RepoRefResolver {
/**
* Obtain a RemoteRepoRef from the given push, correctly
* resolving provider.
* @param {OnPushToAnyBranch.Push} push
* @return {any}
*/
repoRefFromPush(push: OnPushToAnyBranch.Push): RemoteRepoRef;
toBitBucketServerRepoRef(params: {
providerUrl: string;
owner: string;
name: string;
sha: string;
branch?: string;
}): BitBucketServerRepoRef;
providerIdFromPush(push: OnPushToAnyBranch.Push): string;
repoRefFromSdmGoal(sdmGoal: SdmGoalEvent): RemoteRepoRef;
/**
* Convert GraphQL return to our remote repo ref, instantiating
* the correct type based on provider
* @param {CoreRepoFieldsAndChannels.Fragment} repo
* @param opts options - sha or branch
* @return {RemoteRepoRef}
*/
toRemoteRepoRef(repo: CoreRepoFieldsAndChannels.Fragment, opts?: {
sha?: string;
branch?: string;
}): RemoteRepoRef;
}
//# sourceMappingURL=DefaultRepoRefResolver.d.ts.map