commands

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommentFromScanner added in v0.13.0

func BuildCommentFromScanner(scanner *bufio.Scanner) (string, error)

func BuildSummaryAndDescriptionFromScanner

func BuildSummaryAndDescriptionFromScanner(scanner *bufio.Scanner) (string, string, error)

func CreateIssueSummaryDescription

func CreateIssueSummaryDescription(prefill string) (string, string, error)

CreateIssueSummaryDescription takes care of creating an empty tmp file and opening an editor on that, reading the result once the editor is closed then shoving that into a title and a description. SetupTmpFileWithEditor is what you're looking for to just get the file thing.

func GetIssueIntoEditor

func GetIssueIntoEditor(c jiwa.Client, key string) (string, string, error)

func ReadStdin added in v0.11.0

func ReadStdin() ([]byte, error)

Types

type Command

type Command struct {
	Config Config
	Client jiwa.Client
}

func (*Command) Cat added in v0.10.0

func (c *Command) Cat(issueID string) (jira.Issue, error)

func (*Command) Comment added in v0.12.0

func (c *Command) Comment(issues []string, comment string) ([]string, error)

func (*Command) ConstructIssueURL added in v0.11.3

func (c *Command) ConstructIssueURL(issueKey string) string

func (*Command) Create

func (c *Command) Create(project, srcFilePath, ticketType, component string) (string, error)

func (*Command) Edit

func (c *Command) Edit(issueID string) (string, error)

func (*Command) FishOutProject added in v0.8.1

func (c *Command) FishOutProject(projectFlag string) (string, error)

func (*Command) IssueTypes added in v0.10.0

func (c *Command) IssueTypes(projectKey string) ([]jira.IssueType, error)

func (*Command) Label added in v0.8.1

func (c *Command) Label(issues, labels []string) ([]string, error)

func (*Command) List added in v0.8.1

func (c *Command) List(input ListInput) ([]jira.Issue, error)

func (*Command) Move added in v0.8.1

func (c *Command) Move(issues []string, status string) ([]string, error)

func (*Command) ReadIssueListFromStdin added in v0.11.1

func (c *Command) ReadIssueListFromStdin() ([]string, error)

func (*Command) Reassign added in v0.8.1

func (c *Command) Reassign(issues []string, username string) ([]string, error)

func (*Command) Search added in v0.10.0

func (c *Command) Search(jqlQuery string) ([]jira.Issue, error)

func (*Command) StripBaseURL added in v0.11.3

func (c *Command) StripBaseURL(url string) string

type Config

type Config struct {
	BaseURL        string        `json:"baseURL"`
	APIVersion     string        `json:"apiVersion"`
	EndpointPrefix string        `json:"endpointPrefix"`
	Username       string        `json:"username"`
	Password       string        `json:"password"`
	Token          string        `json:"token"`
	Timeout        time.Duration `json:"timeout"`
	DefaultProject string        `json:"defaultProject"`
}

func (*Config) IsValid

func (c *Config) IsValid() bool

func (*Config) ReturnCleanEndpointPrefix added in v0.10.0

func (c *Config) ReturnCleanEndpointPrefix() string

type ListInput added in v0.13.0

type ListInput struct {
	Assignee string
	Project  string
	Status   string
	Labels   []string
}

Jump to

Keyboard shortcuts

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