Documentation
¶
Index ¶
- func Create(opts PROptions) (string, error)
- func CreatePR(title, body, branch string) (string, error)
- func CreatePRDraft(title, body, branch string) (string, error)
- func CreateStackedPR(opts PROptions, baseBranch string) (string, error)
- func ExtractIssueReference(text string) string
- func FormatClosesClause(issues []string) string
- func RenderTemplate(tmplStr string, data TemplateData) (string, error)
- func ResolveReviewers(changedFiles []string, defaultReviewers []string, byPath map[string][]string) []string
- type Context
- type Generator
- type PRContent
- type PROptions
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePRDraft ¶
CreatePRDraft creates a draft GitHub PR using the gh CLI (legacy wrapper)
func CreateStackedPR ¶
CreateStackedPR creates a GitHub PR with a specific base branch (for stacked PRs) This allows creating PRs that target a branch other than the repository default
func ExtractIssueReference ¶
ExtractIssueReference extracts issue references from text Supports formats: #123, fixes #123, closes #123, resolves #123
func FormatClosesClause ¶
FormatClosesClause formats issue references for PR body
func RenderTemplate ¶
func RenderTemplate(tmplStr string, data TemplateData) (string, error)
RenderTemplate renders a custom PR body template with the given data
Types ¶
type Context ¶
type Context struct {
Task string
Branch string
Diff string
CommitLog string
ChangedFiles []string
InstanceID string
}
Context holds all the information needed to generate PR content
type PROptions ¶
type PROptions struct {
Title string
Body string
Branch string
Draft bool
Reviewers []string
Labels []string
}
PROptions contains options for PR creation
type TemplateData ¶
type TemplateData struct {
// AISummary is the AI-generated summary (if available)
AISummary string
// Task is the original task description
Task string
// Branch is the branch name
Branch string
// ChangedFiles is a list of modified file paths
ChangedFiles []string
// CommitLog is the git commit history
CommitLog string
// LinkedIssue is any detected issue reference (e.g., "#42")
LinkedIssue string
// InstanceID is the Claudio instance identifier
InstanceID string
}
TemplateData contains all data available to PR templates
Click to show internal directories.
Click to hide internal directories.