jira

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeContent

func SanitizeContent(s string) string

SanitizeContent strips Atlassian-specific custom HTML elements from markdown content, replacing them with their plain-text inner content.

Types

type Client

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

Client calls JIRA tools via the Atlassian MCP server.

func NewClient

func NewClient(name string) (*Client, error)

NewClient creates a JIRA client for a named connection.

func (*Client) Close

func (c *Client) Close() error

Close terminates the MCP session.

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser(ctx context.Context) (string, error)

GetCurrentUser returns the account ID of the authenticated user.

func (*Client) GetIssue

func (c *Client) GetIssue(ctx context.Context, key string) (*Issue, error)

GetIssue fetches a single issue by key.

func (*Client) Init

func (c *Client) Init(ctx context.Context) error

Init connects to the Atlassian MCP server and establishes a session.

func (*Client) SearchIssues

func (c *Client) SearchIssues(ctx context.Context, jql string) ([]Issue, error)

SearchIssues executes a JQL query and returns matching issues.

type Comment

type Comment struct {
	Author  User
	Body    string
	Created time.Time
}

type CommentPage

type CommentPage struct {
	Comments []Comment
	Total    int
}

type Issue

type Issue struct {
	Key    string
	Fields IssueFields
}

type IssueFields

type IssueFields struct {
	Summary     string
	Description string
	Status      Status
	Assignee    *User
	DueDate     string // YYYY-MM-DD or empty
	Labels      []string
	IssueType   IssueType
	Parent      *ParentRef
	Subtasks    []Issue
	Comment     CommentPage
}

type IssueType

type IssueType struct {
	Name    string
	Subtask bool
}

type ParentRef

type ParentRef struct {
	Key string
}

type SearchResult

type SearchResult struct {
	Issues     []Issue
	StartAt    int
	MaxResults int
	Total      int
}

SearchResult represents the paginated response from JIRA search.

type Status

type Status struct {
	Name           string
	StatusCategory StatusCategory
}

type StatusCategory

type StatusCategory struct {
	Key string // "new", "indeterminate", "done"
}

type TokenStore

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

TokenStore manages OAuth2 tokens for a named JIRA connection, persisting them to ~/.config/karya/jira-tokens/<name>.json.

func NewTokenStore

func NewTokenStore(name string) *TokenStore

NewTokenStore creates a token store for the given connection name.

func (*TokenStore) AccessToken

func (ts *TokenStore) AccessToken() (string, error)

AccessToken returns a valid access token, refreshing if needed.

func (*TokenStore) Endpoint

func (ts *TokenStore) Endpoint() string

Endpoint returns the MCP endpoint URL stored with the token.

func (*TokenStore) HasToken

func (ts *TokenStore) HasToken() bool

HasToken returns true if a token is loaded.

func (*TokenStore) Load

func (ts *TokenStore) Load() error

Load reads the stored token from disk.

func (*TokenStore) RunAuthFlow

func (ts *TokenStore) RunAuthFlow(ctx context.Context, endpoint string) error

RunAuthFlow discovers OAuth metadata from the MCP endpoint, performs dynamic client registration, and runs the PKCE authorization code flow.

type User

type User struct {
	AccountID   string
	DisplayName string
}

Jump to

Keyboard shortcuts

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