jira

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: MPL-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const MaxIssueTypeLength = 7
View Source
const MaxStatusNameLength = 14

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertedQuery added in v0.47.0

type ConvertedQuery struct {
	Query          string        `json:"query"`
	ConvertedQuery string        `json:"convertedQuery"`
	UserMessages   []UserMessage `json:"userMessages"`
}

ConvertedQuery represents a single converted JQL query

type Issue

type Issue struct {
	Expand string `json:"expand"`
	ID     string `json:"id"`
	Self   string `json:"self"`
	Key    string `json:"key"`

	IssueFields *IssueFields `json:"fields"`
}

type IssueFields

type IssueFields struct {
	Summary string `json:"summary"`

	IssueType   *IssueType   `json:"issuetype"`
	IssueStatus *IssueStatus `json:"status"`
}

type IssueStatus

type IssueStatus struct {
	ISelf        string `json:"self"`
	IDescription string `json:"description"`
	IName        string `json:"name"`
}

type IssueType

type IssueType struct {
	Self        string `json:"self"`
	ID          string `json:"id"`
	Description string `json:"description"`
	IconURL     string `json:"iconUrl"`
	Name        string `json:"name"`
	Subtask     bool   `json:"subtask"`
}

type JQLConversionRequest added in v0.47.0

type JQLConversionRequest struct {
	QueryStrings []string `json:"queryStrings"`
}

JQLConversionRequest represents the request body for the JQL conversion API

type JQLConversionResponse added in v0.47.0

type JQLConversionResponse struct {
	QueryStrings []ConvertedQuery `json:"queryStrings"`
}

JQLConversionResponse represents the response from the JQL conversion API

type SearchResult

type SearchResult struct {
	StartAt    int     `json:"startAt"`
	MaxResults int     `json:"maxResults"`
	Total      int     `json:"total"`
	Issues     []Issue `json:"issues"`
}

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

type UserIDCache added in v0.47.0

type UserIDCache struct {
	AccountID string
	ExpiresAt time.Time
}

UserIDCache represent a cached username to account ID mapping

type UserIDCacheMap added in v0.47.0

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

UserIDCacheMap holds the cache with thread safety

func (*UserIDCacheMap) Clear added in v0.47.0

func (c *UserIDCacheMap) Clear()

Clear removes all expired entries from the cache

func (*UserIDCacheMap) Get added in v0.47.0

func (c *UserIDCacheMap) Get(username string) (string, bool)

Get retrieves a cache account ID for a username

func (*UserIDCacheMap) Set added in v0.47.0

func (c *UserIDCacheMap) Set(username, accountID string, duration time.Duration)

Set stores a username to account ID mapping with expiration

type UserMessage added in v0.47.0

type UserMessage struct {
	MessageKey  string            `json:"messageKey"`
	MessageArgs map[string]string `json:"messageArgs"`
}

UserMessage represents messages about the conversion

type Widget

type Widget struct {
	view.ScrollableWidget
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

func (*Widget) ConvertJQLWithUsername added in v0.47.0

func (widget *Widget) ConvertJQLWithUsername(username string) (string, error)

ConvertJQLWithUsername converts a JQL query containing username to account ID

func (*Widget) IssuesFor

func (widget *Widget) IssuesFor(username string, projects []string, jql string) (*SearchResult, error)

IssuesFor returns a collection of issues for a given collection of projects. If username is provided, it scopes the issues to that person

func (*Widget) Refresh

func (widget *Widget) Refresh()

func (*Widget) Render added in v0.10.0

func (widget *Widget) Render()

Jump to

Keyboard shortcuts

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