context

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectPRContext

func InjectPRContext(ctx context.Context, worktreePath string, fullRepo string, prNumber int) error

InjectPRContext fetches PR metadata from GitHub and writes a CLAUDE.md file in the given worktree directory.

func RenderClaudeMD

func RenderClaudeMD(prCtx PRContext) (string, error)

RenderClaudeMD renders the template to a string (useful for testing/preview).

func WriteClaudeMD

func WriteClaudeMD(dir string, prCtx PRContext) error

WriteClaudeMD renders the template and writes PR review context to the worktree. Always writes to CLAUDE.local.md so the repo's own CLAUDE.md is never modified — no risk of accidental commits.

Types

type PRContext

type PRContext struct {
	Number       int
	Title        string
	Author       string
	URL          string
	HeadBranch   string
	BaseBranch   string
	IsFork       bool
	Body         string
	ChangedFiles []string
}

PRContext holds all data needed to render the CLAUDE.md template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL