Documentation ¶
Index ¶
- func CreateComment(j Client, timeout time.Duration, jIssue jira.Issue, ...) (jira.Comment, error)
- func CreateIssue(j Client, timeout time.Duration, issue jira.Issue) (jira.Issue, error)
- func GetIssue(j Client, timeout time.Duration, key string) (jira.Issue, error)
- func ListIssues(j Client, timeout time.Duration, jiraProjectKey string, githubIdFieldId string, ...) ([]jira.Issue, error)
- func TryApplyTransitionWithStatusName(j Client, issue jira.Issue, statusName string) error
- func UpdateComment(j Client, timeout time.Duration, issue jira.Issue, id string, ...) (jira.Comment, error)
- func UpdateIssue(j Client, timeout time.Duration, issue jira.Issue) (jira.Issue, error)
- type Client
- type TestJiraClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateComment ¶
func CreateComment(j Client, timeout time.Duration, jIssue jira.Issue, ghComment github.IssueComment, g issuesyncgithub.Client) (jira.Comment, error)
CreateComment adds a comment to the provided JIRA issue using the fields from the provided GitHub comment. It then returns the created comment.
func CreateIssue ¶
CreateIssue creates a new JIRA issue according to the fields provided in the provided issue object. It returns the created issue, with all the fields provided (including e.g. ID and Key).
func GetIssue ¶
GetIssue returns a single JIRA issue within the configured project according to the issue key (e.g. "PROJ-13").
func ListIssues ¶
func ListIssues(j Client, timeout time.Duration, jiraProjectKey string, githubIdFieldId string, ghIssueIds []int64) ([]jira.Issue, error)
ListIssues returns a list of JIRA issues on the configured project which have GitHub IDs in the provided list. `ids` should be a comma-separated list of GitHub IDs.
func UpdateComment ¶
func UpdateComment(j Client, timeout time.Duration, issue jira.Issue, id string, comment github.IssueComment, g issuesyncgithub.Client) (jira.Comment, error)
UpdateComment updates a comment (identified by the `id` parameter) on a given JIRA with a new body from the fields of the given GitHub comment. It returns the updated comment.
Types ¶
type Client ¶
type Client interface {
// contains filtered or unexported methods
}
Client is a wrapper around the JIRA API clients library we use. It allows us to hide implementation details such as backoff as well as swap in other implementations, such as for dry run or test mocking.
type TestJiraClient ¶
type TestJiraClient struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
func NewTestClient() TestJiraClient