Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// contains filtered or unexported fields
}

func (*Action) Configure

func (x *Action) Configure(ctx context.Context) error

Configure implements interfaces.Tool

func (*Action) Flags

func (x *Action) Flags() []cli.Flag

func (*Action) GetConfigs

func (x *Action) GetConfigs() []*RepositoryConfig

func (*Action) Helper

func (x *Action) Helper() *cli.Command

func (*Action) LogValue

func (x *Action) LogValue() slog.Value

func (*Action) Name

func (x *Action) Name() string

func (*Action) Prompt

func (x *Action) Prompt(ctx context.Context) (string, error)

Prompt implements interfaces.Tool

func (*Action) Run

func (x *Action) Run(ctx context.Context, name string, args map[string]any) (map[string]any, error)

Run implements gollem.ToolSet

func (*Action) SetConfigs

func (x *Action) SetConfigs(configs []*RepositoryConfig)

func (*Action) SetGitHubClient

func (x *Action) SetGitHubClient(client *github.Client)

Helper methods for testing

func (*Action) SetTestData

func (x *Action) SetTestData(appID, installationID int64, privateKey string, configFiles []string)

func (*Action) Specs

func (x *Action) Specs(ctx context.Context) ([]gollem.ToolSpec, error)

Specs implements gollem.ToolSet

type CodeSearchResult

type CodeSearchResult struct {
	Repository   string    `json:"repository"`
	Path         string    `json:"path"`
	HTMLURL      string    `json:"html_url"`
	Matches      []string  `json:"matches"`
	Language     string    `json:"language,omitempty"`
	LastModified time.Time `json:"last_modified,omitempty"`
}

CodeSearchResult represents a code search result

type Config

type Config struct {
	Repositories []*RepositoryConfig `yaml:"repositories" json:"repositories"`
}

Config represents the GitHub tool configuration

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 result

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 an issue/PR search result

type RepositoryConfig

type RepositoryConfig struct {
	Owner         string `yaml:"owner" json:"owner"`
	Repository    string `yaml:"repository" json:"repository"`
	Description   string `yaml:"description" json:"description"`
	DefaultBranch string `yaml:"default_branch,omitempty" json:"default_branch,omitempty"`
}

RepositoryConfig represents a GitHub repository configuration

Jump to

Keyboard shortcuts

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