Documentation
¶
Overview ¶
Package github provides GitHub issue management functionality for DataQL.
Index ¶
- Constants
- type Client
- func (c *Client) AddComment(issueNumber int, body string) error
- func (c *Client) CreateIssue(req IssueCreateRequest) (*Issue, error)
- func (c *Client) FindDuplicates(errorKeywords string) ([]Issue, error)
- func (c *Client) IsAuthenticated() bool
- func (c *Client) IsDuplicate(title string, errorMessage string) (*Issue, error)
- func (c *Client) SearchIssues(query string, state string, limit int) ([]Issue, error)
- type CommentRequest
- type Config
- type Issue
- type IssueCreateRequest
- type IssueSearchResult
Constants ¶
const ( LabelBug = "bug" LabelAutoReported = "auto-reported" LabelFileHandler = "file-handler" LabelDatabase = "database" LabelStorage = "storage" LabelMCP = "mcp" LabelREPL = "repl" LabelExport = "export" LabelEnhancement = "enhancement" LabelDocumentation = "documentation" )
Common labels used for DataQL issues.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods for interacting with GitHub issues.
func NewDefaultClient ¶
func NewDefaultClient() *Client
NewDefaultClient creates a new GitHub client with default DataQL configuration.
func (*Client) AddComment ¶
AddComment adds a comment to an existing issue.
func (*Client) CreateIssue ¶
func (c *Client) CreateIssue(req IssueCreateRequest) (*Issue, error)
CreateIssue creates a new issue with the given details.
func (*Client) FindDuplicates ¶
FindDuplicates searches for issues that might be duplicates of the given title/error. Returns issues that have similar titles or contain similar error messages.
func (*Client) IsAuthenticated ¶
IsAuthenticated checks if the gh CLI is authenticated.
func (*Client) IsDuplicate ¶
IsDuplicate checks if there's likely a duplicate issue for the given error. Returns the duplicate issue if found, nil otherwise.
type CommentRequest ¶
type CommentRequest struct {
Body string `json:"body"`
}
CommentRequest represents a request to add a comment to an issue.
type Config ¶
Config holds the configuration for GitHub operations.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default configuration for DataQL repository.
type Issue ¶
type Issue struct {
Number int `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
State string `json:"state"`
Labels []string `json:"labels"`
URL string `json:"url"`
HTMLURL string `json:"html_url"` //nolint:tagliatelle // GitHub API naming
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ClosedAt string `json:"closed_at,omitempty"`
CommentsURL string `json:"comments_url"`
}
Issue represents a GitHub issue. Fields use GitHub API JSON naming convention.
type IssueCreateRequest ¶
type IssueCreateRequest struct {
Title string `json:"title"`
Body string `json:"body"`
Labels []string `json:"labels,omitempty"`
}
IssueCreateRequest represents a request to create a new issue.
type IssueSearchResult ¶
type IssueSearchResult struct {
Issues []Issue `json:"items"` //nolint:tagliatelle // GitHub API naming
TotalCount int `json:"total_count"`
}
IssueSearchResult represents the result of searching for issues. Uses GitHub API field names.