Documentation
¶
Index ¶
- func ADFDescription(description string, acceptanceCriteria []string, documentURL string) map[string]any
- type Client
- func (c *Client) CreateIssue(ctx context.Context, body map[string]any) (*IssueResponse, error)
- func (c *Client) CreateIssueLink(ctx context.Context, linkType, inwardIssueKey, outwardIssueKey string) error
- func (c *Client) Do(request *http.Request, responseTarget any) error
- func (c *Client) GetIssueLinkTypes(ctx context.Context) ([]string, error)
- func (c *Client) GetIssueLinks(ctx context.Context, issueKey string) ([]IssueLink, error)
- func (c *Client) GetIssueProperty(ctx context.Context, issueKey, propertyKey string) (string, error)
- func (c *Client) NewRequest(ctx context.Context, method, path string, body any) (*http.Request, error)
- func (c *Client) SearchJQL(ctx context.Context, jql string, maxResults int, nextPageToken string) (*SearchResult, error)
- type IssueLink
- type IssueResponse
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ADFDescription ¶
func ADFDescription(description string, acceptanceCriteria []string, documentURL string) map[string]any
adfDescription renders a work item as an Atlassian Document Format document. ADF has no Markdown fallback: a heading is a heading node and a bullet is a list node, so the same prose that renders on GitHub has to be translated rather than passed through.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles communication with Jira Rest API
func NewClient ¶
NewClient creates new Jira API client Accepts custom *http.Client, uses DefaultClient if nil [i.e base URL https://my-domain.atlassian.net and auth creds ]
func (*Client) CreateIssue ¶
CreateIssue creates a new issue in Jira
func (*Client) CreateIssueLink ¶
func (c *Client) CreateIssueLink(ctx context.Context, linkType, inwardIssueKey, outwardIssueKey string) error
CreateIssueLink creates a link between two issues
func (*Client) Do ¶
Do executes an API request and unmarshals the response body into responseTarget.
func (*Client) GetIssueLinkTypes ¶
GetIssueLinkTypes fetches all valid link types on the Jira instance
func (*Client) GetIssueLinks ¶
GetIssueLinks fetches an issue to get its links (used by our Adapter for checking if a link exists)
func (*Client) GetIssueProperty ¶
func (c *Client) GetIssueProperty(ctx context.Context, issueKey, propertyKey string) (string, error)
GetIssueProperty retrieves a property of an issue
type IssueResponse ¶
IssueResponse is a basic representation of a created / fetched Jira issue
type SearchResult ¶
type SearchResult struct {
Issues []IssueResponse `json:"issues"`
NextPageToken string
IsLast bool
}
SearchResult is a response from JQL search