jira

package
v0.0.0-...-c229084 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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
}

Client 用于操作 jira 的客户端对象

func NewClient

func NewClient(baseURL string, username, password string) (*Client, error)

NewClient create a new jira client

func (Client) CreateComment

func (client Client) CreateComment(ctx context.Context, issueID string, comment string) error

CreateComment 创建一个评论

func (Client) CreateIssue

func (client Client) CreateIssue(ctx context.Context, issue Issue) (string, error)

CreateIssue create a jira issue

func (Client) GetCustomFields

func (client Client) GetCustomFields(ctx context.Context) ([]CustomField, error)

GetCustomFields 获取所有的自定义字段

func (Client) GetIssue

func (client Client) GetIssue(ctx context.Context, issueID string) (IssueResp, error)

GetIssue 获取一个 Issue

func (Client) GetIssueTypes

func (client Client) GetIssueTypes(ctx context.Context, projectKey string) ([]IssueType, error)

GetIssueTypes return all issue types for a project

func (Client) GetPriorities

func (client Client) GetPriorities(ctx context.Context) ([]IssuePriority, error)

GetPriorities return all priorities supported by jira

func (Client) UpdateIssue

func (client Client) UpdateIssue(ctx context.Context, issueID string, customFields map[string]interface{}) error

UpdateIssue 更新 Issue 的自定义字段

type CustomField

type CustomField struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

CustomField 自定义字段

type Issue

type Issue struct {
	CustomFields map[string]interface{} `json:"custom_fields"`
	ProjectKey   string                 `json:"project_key"`
	Summary      string                 `json:"summary"`
	Description  string                 `json:"description"`
	IssueType    string                 `json:"issue_type"`
	Priority     string                 `json:"priority"`
	Assignee     string                 `json:"assignee"`
}

Issue 一个 Jira Issue

type IssuePriority

type IssuePriority struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

IssuePriority is a jira issue priority object

type IssueResp

type IssueResp struct {
	Issue  Issue  `json:"issue"`
	Status string `json:"status"`
}

IssueResp 查询到的 Issue,附加状态

type IssueType

type IssueType struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

IssueType is a jira issue type object

Jump to

Keyboard shortcuts

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