import type { Command } from 'commander'; import type { Config } from '../types/index.js'; /** * `hula contribute ` — one command to start contributing to a repo * you do NOT own ("contribution / guest mode"). It forks the upstream, clones * the **fork** (origin = fork, upstream = parent), writes a minimal guest * config (`contributionMode: true`) and `.git/info/exclude` entries, then guides * the GitHub-App install + `hula login` inside the clone. * * It deliberately does NOT run full `hula init` (so nothing lands in `.agents/` * or `.vscode/`) and never weakens the write-access auth gate: it only ever * clones the fork, where the user has write access. The GitHub-App install is a * guided-but-manual step because it is an interactive GitHub consent flow a CLI * cannot complete on the user's behalf. */ /** Parsed `hula contribute` target. */ export interface ContributeTarget { owner: string; repo: string; /** Present only when the input was an issue URL; echoed in the next-step hint. */ issueNumber?: number; } /** * Parse a contribution target. Accepts `owner/repo`, a GitHub repo URL (with or * without a `.git` suffix and an optional trailing slash), or an issue URL * (`https://github.com/owner/repo/issues/123`). All forms resolve to the same * `{ owner, repo }`; an issue URL additionally retains the issue number for the * final next-step hint. Pure (no I/O) and exported for tests. */ export declare function parseContributeTarget(input: string): ContributeTarget; /** * The `.git/info/exclude` lines `hula contribute` writes into the fork clone: * keep every HubLaunch artifact under `.hublaunch/` off the fork, but track the * plans directory so a plan can be committed when wanted. Consistent with the * contribution-hygiene intent. Exported for tests. */ export declare const CONTRIBUTE_EXCLUDE_ENTRIES: readonly string[]; /** * Build the minimal guest `.hublaunch/hublaunch.config.js` contents. Contains * only what a guest contribution flow needs: `contributionMode: true`, the fork * as `hulaProject` (origin), the fork's default branch as `uploadBranch`, and * the plan path. HubLaunch resolves the upstream from the fork's parent when * contribution mode engages. Pure and exported for tests. */ export declare function buildGuestConfigContent(opts: { /** `forkOwner/repo`. */ forkFullName: string; /** The fork's default branch. */ uploadBranch: string; version?: string | null; planPath?: string; }): string; export interface ContributeOptions { dir?: string; yes?: boolean; } export declare function contributeCommand(program: Command, config: Config): void; export declare function executeContribute(config: Config, upstream: string, options?: ContributeOptions): Promise; //# sourceMappingURL=contribute.d.ts.map