Documentation
¶
Index ¶
- type Client
- func (ic *Client) AssignIssue(issueID, assigneeID string) error
- func (ic *Client) BatchUpdateIssues(issueIDs []string, update core.BatchIssueUpdate) (*core.BatchIssueUpdateResult, error)
- func (ic *Client) CreateIssue(title, description, teamID string) (*core.Issue, error)
- func (ic *Client) GetIssue(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueSimplified(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueWithBestContext(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueWithFallback(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueWithParentContext(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueWithProjectContext(issueID string) (*core.Issue, error)
- func (ic *Client) GetIssueWithRelations(issueID string) (*core.IssueWithRelations, error)
- func (ic *Client) GetSubIssues(parentIssueID string) ([]core.SubIssue, error)
- func (ic *Client) GetTeamIssuesWithRelations(teamID string, limit int) ([]core.IssueWithRelations, error)
- func (ic *Client) ListAllIssues(filter *core.IssueFilter) (*core.ListAllIssuesResult, error)
- func (ic *Client) ListAssignedIssues(limit int) ([]core.Issue, error)
- func (ic *Client) ListIssueAttachments(issueID string) ([]core.Attachment, error)
- func (ic *Client) RemoveIssueMetadataKey(issueID, key string) error
- func (ic *Client) SearchIssuesEnhanced(filters *core.IssueSearchFilters) (*core.IssueSearchResult, error)
- func (ic *Client) UpdateIssue(issueID string, input core.UpdateIssueInput) (*core.Issue, error)
- func (ic *Client) UpdateIssueDescription(issueID, newDescription string) error
- func (ic *Client) UpdateIssueMetadataKey(issueID, key string, value interface{}) error
- func (ic *Client) UpdateIssueState(issueID, stateID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
IssueClient handles all issue-related operations for the Linear API. It uses the shared BaseClient for HTTP communication and focuses solely on issue management functionality.
func NewClient ¶
func NewClient(base *core.BaseClient) *Client
NewIssueClient creates a new issue client with the provided base client
func (*Client) AssignIssue ¶
AssignIssue assigns or unassigns an issue to/from a user Why: Issue assignment is crucial for workload management. Passing an empty assigneeID unassigns the issue, providing flexibility in one method.
func (*Client) BatchUpdateIssues ¶
func (ic *Client) BatchUpdateIssues(issueIDs []string, update core.BatchIssueUpdate) (*core.BatchIssueUpdateResult, error)
BatchUpdateIssues updates multiple issues with the same changes Why: Bulk operations are common in issue management, such as moving multiple issues to a new state, assigning them to someone, or applying labels in bulk.
func (*Client) CreateIssue ¶
CreateIssue creates a new issue in Linear Why: This is a core function for creating work items in Linear. It requires a team assignment and supports optional descriptions for detailed context.
func (*Client) GetIssue ¶
GetIssue retrieves a single issue by ID Why: This is the primary method for fetching detailed issue information. It automatically extracts metadata from the description for easy access.
func (*Client) GetIssueSimplified ¶
GetIssueSimplified retrieves a single issue by ID with reduced query complexity Why: The full GetIssue query can sometimes hit server complexity limits for issues with many children or complex data. This simplified version excludes children nodes to reduce query complexity.
func (*Client) GetIssueWithBestContext ¶
GetIssueWithBestContext retrieves an issue with the most appropriate context Why: This intelligently determines whether to fetch parent or project context based on the issue's actual relationships, avoiding unnecessary API calls.
func (*Client) GetIssueWithFallback ¶
GetIssueWithFallback attempts to get an issue with full details, falling back to simplified query if the full query fails with a server error. Why: This provides resilience against server-side complexity limits while still attempting to get full data when possible.
func (*Client) GetIssueWithParentContext ¶
GetIssueWithParentContext retrieves an issue with parent issue details Why: Understanding issue hierarchy is important for sub-tasks. This method provides parent context needed for proper sub-task management.
func (*Client) GetIssueWithProjectContext ¶
GetIssueWithProjectContext retrieves an issue with additional project information Why: When working within a project context, we need more project details like metadata and state. This method provides that extended information in one call.
func (*Client) GetIssueWithRelations ¶
func (ic *Client) GetIssueWithRelations(issueID string) (*core.IssueWithRelations, error)
GetIssueWithRelations retrieves an issue with its blocking/blocked-by relations for dependency graph visualization.
func (*Client) GetSubIssues ¶
GetSubIssues retrieves all sub-issues for a given parent issue Why: Sub-task management requires fetching all children of an issue. This dedicated method provides that functionality efficiently.
func (*Client) GetTeamIssuesWithRelations ¶
func (ic *Client) GetTeamIssuesWithRelations(teamID string, limit int) ([]core.IssueWithRelations, error)
GetTeamIssuesWithRelations retrieves all issues for a team with their relations for building a complete dependency graph.
func (*Client) ListAllIssues ¶
func (ic *Client) ListAllIssues(filter *core.IssueFilter) (*core.ListAllIssuesResult, error)
ListAllIssues retrieves issues with comprehensive filtering, pagination, and sorting options Why: Users need flexible ways to query issues across teams, projects, states, etc. This method provides a powerful search interface with metadata support.
func (*Client) ListAssignedIssues ¶
ListAssignedIssues retrieves issues assigned to the authenticated user Why: Users need to see their workload. This method provides a focused view of assigned work with configurable result limits.
func (*Client) ListIssueAttachments ¶
func (ic *Client) ListIssueAttachments(issueID string) ([]core.Attachment, error)
ListIssueAttachments retrieves all attachments for a specific issue Why: Agents need to access UI specs, mockups, and screenshots attached to issues for implementation guidance. This method provides comprehensive attachment metadata including filename, size, content type, and URLs.
func (*Client) RemoveIssueMetadataKey ¶
RemoveIssueMetadataKey removes a specific metadata key from an issue Why: Sometimes metadata keys become obsolete or need to be cleaned up. This method provides that capability without affecting other metadata.
func (*Client) SearchIssuesEnhanced ¶
func (ic *Client) SearchIssuesEnhanced(filters *core.IssueSearchFilters) (*core.IssueSearchResult, error)
SearchIssuesEnhanced searches for issues with advanced filtering options Why: Users need flexible search capabilities to find issues based on multiple criteria like team, state, labels, assignee, priority, and date ranges.
func (*Client) UpdateIssue ¶
UpdateIssue updates an issue with the provided fields Why: Issues need to be updated with various fields like title, description, priority, etc. This method provides a flexible way to update any combination of fields while preserving existing data like metadata.
func (*Client) UpdateIssueDescription ¶
UpdateIssueDescription updates an issue's description while preserving metadata Why: Descriptions may contain both user content and hidden metadata. This method ensures metadata is preserved when users update descriptions.
func (*Client) UpdateIssueMetadataKey ¶
UpdateIssueMetadataKey updates a specific metadata key for an issue Why: Granular metadata updates are more efficient than replacing all metadata. This method allows updating individual keys without affecting others.
func (*Client) UpdateIssueState ¶
UpdateIssueState updates the workflow state of an issue Why: Moving issues through workflow states is a core project management action. This method provides that capability with proper validation.