Documentation
¶
Overview ¶
Package github provides a gollem.ToolSet for GitHub code/issue search, file content retrieval, commit history listing, and git blame.
Package github provides a gollem.ToolSet for GitHub code/issue search, file content retrieval, commit history listing, and git blame.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlameRange ¶
type BlameRange struct {
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
CommitSHA string `json:"commit_sha"`
CommitMessage string `json:"commit_message"`
Author string `json:"author"`
Date time.Time `json:"date"`
}
BlameRange represents a contiguous set of lines attributed to a single commit.
type CodeSearchResult ¶
type CodeSearchResult struct {
Repository string `json:"repository"`
Path string `json:"path"`
HTMLURL string `json:"html_url"`
Matches []string `json:"matches"`
}
CodeSearchResult represents a single code search result.
type CommitResult ¶
type CommitResult struct {
SHA string `json:"sha"`
Message string `json:"message"`
Author string `json:"author"`
Date time.Time `json:"date"`
HTMLURL string `json:"html_url"`
}
CommitResult represents a single commit in the list-commits response.
type ContentResult ¶
type ContentResult struct {
Repository string `json:"repository"`
Path string `json:"path"`
Content string `json:"content"`
SHA string `json:"sha"`
HTMLURL string `json:"html_url"`
Size int `json:"size"`
}
ContentResult represents file content retrieved from a repository.
type IssueSearchResult ¶
type IssueSearchResult struct {
Repository string `json:"repository"`
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
HTMLURL string `json:"html_url"`
User string `json:"user"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
IsPR bool `json:"is_pr"`
Body string `json:"body,omitempty"`
Labels []string `json:"labels,omitempty"`
}
IssueSearchResult represents a single issue or pull-request search result.
type Option ¶
type Option func(*ToolSet)
Option configures a ToolSet.
func WithLogger ¶
WithLogger sets the logger. A nil logger keeps the default (slog.Default()).
type ToolSet ¶
type ToolSet struct {
// contains filtered or unexported fields
}
ToolSet implements gollem.ToolSet for GitHub. Fields are unexported; configure via Option.
func New ¶
New constructs the ToolSet with the three required credentials as positional arguments. appID and installationID must be non-zero; privateKey must be a non-empty PEM string. Optional settings (e.g. WithLogger) are passed as opts. New performs only in-memory validation and transport construction; use Ping to verify connectivity.
func (*ToolSet) Ping ¶
Ping verifies connectivity and credentials by fetching a short-lived installation token from the GitHub API.