Documentation
¶
Overview ¶
PR-number resolution for `gitl review pr/N` (§ post-MVP). The GitHub CLI (`gh`) resolves a PR number into base/head SHAs; the diff itself is then computed locally by gitlog.Runner (triple-dot base...head, like GitHub), so the whole shaping pipeline (exclude_globs, truncation, stats) stays identical across review modes.
Package cli wires up the gitl command tree (cobra) and shared scaffolding: persistent flags, viper-backed config loading, and slog setup.
One file per command: root.go (this scaffold), version.go, review.go, changelog.go, digest.go (see docs/TECHNICAL_PLAN.md §6, §9, §10).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PRRef ¶ added in v0.4.0
type PRRef struct {
BaseSHA string
HeadSHA string
HeadRef string // head branch name, for diagnostics
BaseRefName string // base branch name (e.g. "main") — fetched by name, more robust than a bare SHA
URL string // full PR URL — identifies the PR's repository for remote-name resolution
// CrossRepo marks a PR from a fork. Not an error: `git fetch <remote>
// pull/N/head` works for forks too, so PR review handles them
// transparently.
CrossRepo bool
}
PRRef is the resolved base/head SHA pair for a pull request.