Documentation
¶
Overview ¶
Package item names the pull requests and issues the app works on: their kind, a reference to one item, and the name of the worktree a session on an item runs in.
The inbox, the launcher, the prompt library, the launch records, and the worktree sweep all share these, so a kind stored by one is read the same way by the others, and a worktree made for an item is always found again under the same name.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned for an item that is not in the local inbox. ErrNotFound = errors.New("item not found; refresh the inbox and try again") // ErrInvalidKind is returned for a kind other than "pr" or "issue". ErrInvalidKind = errors.New(`kind must be "pr" or "issue"`) )
Functions ¶
func WorktreeName ¶
WorktreeName is the name of the worktree a session on an item runs in: "pr-<n>" for a pull request and "issue-<n>" for an issue. The same item always gets the same name, so launching it again finds its worktree. The coding agent gives a worktree started at a pull request's head the same "pr-<n>" name.
Types ¶
type Kind ¶
type Kind string
Kind is what an item is: a pull request or an issue. It is stored as "pr" or "issue".
func ParseWorktreeName ¶
ParseWorktreeName reads a name WorktreeName gives: the kind and a positive number of at most ten digits without a leading zero. ok is false for any other name.
type Ref ¶
Ref names one pull request or issue. GitHub's numbers are shared by a repository's pull requests and issues, so the repository and number alone pick the item; Kind says which it is when the caller knows.