import { hn as RepositoryRef } from "../../index-DJ6CHaMc.js"; import { r as RunMetadata } from "../../resources-B6ZjmsZN.js"; import { g as Worktree, h as PullRequestWorktree } from "../../change-DqLNW9Dp.js"; //#region src/steps/workspaces/list-bindings.d.ts /** * Every binding in the factory's configuration, with the repository it points at. * * @group Worktrees */ declare function listBindings(): Array; //#endregion //#region src/steps/workspaces/provision-worktree.d.ts /** * The binding and branch used to provision a run's worktree. * * @group Worktrees */ interface WorktreeRequest { binding: string; /** The branch name to start from; the run's own branch adds a suffix from its run ID. */ branch: string; } /** * The binding and pull request used to provision a worktree at the pull request's head. * * @group Worktrees */ interface PullRequestWorktreeRequest { /** The binding whose repository the pull request is on. */ binding: string; /** The pull request's number. */ number: number; } /** * Create this run's own branch and worktree from the default branch, and prepare its files and * dependencies. * * @remarks * Every run gets a new branch, so a run never picks up another run's work. The returned * `branch` is the one to push and open a pull request from. * * @group Worktrees */ declare function provisionWorktree(request: WorktreeRequest, metadata: RunMetadata): Promise; /** * Check out a pull request's current head in a worktree of its own, and prepare its files and * dependencies. * * @remarks * Only a pull request from a branch of the binding's own repository is checked out, never one * from a fork, because the binding's setup runs the pull request's code. The worktree has no * branch, so nothing in it is pushed. Each head gets its own worktree, so a * run that provisions again after a push gets the new head beside the old one. Pass the returned * `headSha` to `mergePullRequest` to merge only the commit that was checked. * * @group Worktrees */ declare function provisionPullRequestWorktree(request: PullRequestWorktreeRequest, metadata: RunMetadata): Promise; //#endregion export { type PullRequestWorktreeRequest, type WorktreeRequest, listBindings, provisionPullRequestWorktree, provisionWorktree };