/** * GitHub Issues tracker adapter — projects GitHub onto the neutral * TrackerAdapter contract. * ============================================================================ * * Thin wrapper over github.js. GitHub Issues are the awkward provider for a * tracker abstraction, because GitHub has NO workflow/transition model: an * issue is just open|closed. Everything richer (todo vs in-progress, blocked) * is a labelling CONVENTION, not a native state. This adapter makes that * convention explicit and keeps it documented in one place. * * SCOPING: GitHub issues live in a repo, so every method needs {owner, repo}. * That comes from `ctx` (per-call) or env GITHUB_OWNER / GITHUB_REPO. There is * no global "list all my issues" call here on purpose — it would not map. * * STATE MODEL (the real seam — read this): * - closed → 'done' * - open + a blocked label → 'blocked' (label matches BLOCKED_NAME_RE) * - open + an in-progress label→ 'in_progress' (label matches IN_PROGRESS_RE, * e.g. "in progress", "in-progress", "wip", * "doing", "started") * - open + (none of the above) → 'todo' * The labels are a CONVENTION: GitHub has no concept of them being "states". * A repo that doesn't use them simply shows every open issue as 'todo'. * * transition (NO native equivalent) maps the target name onto this convention: * - a done/closed-ish name → close the issue (state_reason 'completed') * - a todo/open-ish name → reopen + clear progress/blocked labels * - 'in progress'-ish name → ensure open + ADD the in-progress label * - 'blocked'-ish name → ensure open + ADD the blocked label * - anything else → ok:false (unrepresentable on GitHub) — this is a * genuine contract seam, surfaced honestly. * * linkPullRequest: a comment carrying the PR URL (GitHub's native issue↔PR link * requires a closing keyword IN the PR body / a cross-ref event, not an issue * API write, so the portable, always-works path is a comment). * * Auth/config is inherited from github.js (resolveIntegrationToken('github')). */ export declare const githubAdapter: any; export default githubAdapter;