import { LocalSoftwareDeliveryMachineOptions } from "@atomist/sdm-core"; import { EventOnRepo } from "../../../common/git/handlePushBasedEventOnRepo"; import { AutomationClientConnectionRequest } from "../http/AutomationClientConnectionRequest"; export interface GitHookInvocation extends EventOnRepo { event: string; workspaceId: string; } /** * git hooks we support. All hooks are "post" hooks, meaning that * Atomist will never prevent completion of a git operation, but * will be invoked after it is complete. * @type {string[]} */ export declare enum HookEvent { /** * Used to respond to commits. Main Atomist entry point. */ PostCommit = "post-commit", /** * Used when a branch has been merged */ PostMerge = "post-merge", /** * Server side hook. Atomist will clone local projects, using the * file location as a remote. If it makes a transform or autofix, * the push from the cloned repo will result in this server side hook * firing on the original local repo. */ PostReceive = "post-receive" } /** * Invoke an SDM to handle this event. * @param payload event data * @return {Promise} */ export declare function handleGitHookEvent(cc: AutomationClientConnectionRequest, lc: LocalSoftwareDeliveryMachineOptions, payload: GitHookInvocation): Promise;