Documentation
¶
Overview ¶
Package github wraps the GitHub REST API v3 as a wick connector. One instance = one GitHub account or organisation (token + optional custom base URL for GitHub Enterprise). Operations cover the most common LLM-driven workflows: listing repos/issues/PRs, reading file contents, creating issues, and posting comments.
File layout:
- connector.go — Meta, Configs, Input structs, Operations, thin handlers
- service.go — URL construction, input validation, response shaping
- repo.go — outbound HTTP via http.NewRequestWithContext
Index ¶
Constants ¶
const Key = "github"
Variables ¶
This section is empty.
Functions ¶
func Operations ¶
Operations returns the LLM-callable actions for this connector.
Types ¶
type AddCommentInput ¶
type AddCommentInput struct {
Owner string `wick:"required;desc=Repository owner."`
Repo string `wick:"required;desc=Repository name."`
Number int `wick:"required;desc=Issue or PR number."`
Body string `wick:"textarea;required;desc=Comment body (Markdown supported)."`
}
AddCommentInput posts a comment on an issue or PR.
type Configs ¶
type Configs struct {
BaseURL string `` /* 128-byte string literal not displayed */
Token string `` /* 143-byte string literal not displayed */
}
Configs is the per-instance credential set.
type CreateIssueInput ¶
type CreateIssueInput struct {
Owner string `wick:"required;desc=Repository owner."`
Repo string `wick:"required;desc=Repository name."`
Title string `wick:"required;desc=Issue title."`
Body string `wick:"textarea;desc=Issue body (Markdown supported)."`
Labels string `wick:"desc=Comma-separated label names. Example: bug,help wanted"`
}
CreateIssueInput creates a new issue.
type GetFileInput ¶
type GetFileInput struct {
Owner string `wick:"required;desc=Repository owner."`
Repo string `wick:"required;desc=Repository name."`
Path string `wick:"required;desc=File path in repo. Example: README.md or src/main.go"`
Ref string `wick:"desc=Branch, tag, or commit SHA. Default: repo default branch."`
}
GetFileInput reads a file from a repository.
type ListIssuesInput ¶
type ListIssuesInput struct {
Owner string `wick:"required;desc=Repository owner (user or org). Example: octocat"`
Repo string `wick:"required;desc=Repository name. Example: hello-world"`
State string `wick:"desc=open | closed | all. Default: open."`
PerPage int `wick:"desc=Results per page, max 100. Default: 30."`
}
ListIssuesInput lists issues in a repository.
type ListPRsInput ¶
type ListPRsInput struct {
Owner string `wick:"required;desc=Repository owner."`
Repo string `wick:"required;desc=Repository name."`
State string `wick:"desc=open | closed | all. Default: open."`
PerPage int `wick:"desc=Results per page, max 100. Default: 30."`
}
ListPRsInput lists pull requests.
type ListReposInput ¶
type ListReposInput struct {
Affiliation string `wick:"desc=Comma-separated: owner,collaborator,organization_member. Default: owner."`
Visibility string `wick:"desc=all | public | private. Default: all."`
PerPage int `wick:"desc=Results per page, max 100. Default: 30."`
}
ListReposInput lists repositories visible to the token.