Documentation ¶
Index ¶
- func MakeComment(issueID, body string) message.Composer
- func MakeCommentSender(ctx context.Context, id string, opts *Options) (send.Sender, error)
- func MakeIssue(issue *Issue) message.Composer
- func MakeIssueSender(ctx context.Context, opts *Options) (send.Sender, error)
- func NewIssue(project, summary string, fields ...Field) message.Composer
- func Oauth1Client(ctx context.Context, credentials JiraOauthCredentials) (*http.Client, error)
- type BasicAuth
- type Comment
- type Field
- type Issue
- type JiraOauthCredentials
- type Oauth1
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeComment ¶
MakeComment returns a self-contained composer for posting a comment to a single JIRA issue. This composer will override the issue set in the JIRA sender. The composer will not have a priority set
func MakeCommentSender ¶
MakeCommentSender is the same as NewJiraCommentLogger but uses a warning level of Trace
func MakeIssueSender ¶
MakeIssueSender is the same as NewJiraLogger but uses a warning level of Trace
func NewIssue ¶
NewIssue creates and returns a fully formed jiraMessage, which implements message.Composer. project string and summary string are required, and any number of additional fields may be included. Fields with keys Reporter, Assignee, Type, and Labels will be specifically assigned to respective fields in the new jiraIssue included in the jiraMessage, (e.g. JiraIssue.Reporter, etc), and all other fields will be included in jiraIssue.Fields.
func Oauth1Client ¶
Oauth1Client is used to generate a http.Client that supports OAuth 1.0, to be used as the HTTP client in the Jira client implementation above
Types ¶
type Comment ¶
type Comment struct { IssueID string `bson:"issue_id,omitempty" json:"issue_id,omitempty" yaml:"issue_id,omitempty"` Body string `bson:"body" json:"body" yaml:"body"` }
Comment represents a single comment to post to the given JIRA issue
type Issue ¶
type Issue struct { IssueKey string `bson:"issue_key" json:"issue_key" yaml:"issue_key"` Project string `bson:"project" json:"project" yaml:"project"` Summary string `bson:"summary" json:"summary" yaml:"summary"` Description string `bson:"description" json:"description" yaml:"description"` Reporter string `bson:"reporter" json:"reporter" yaml:"reporter"` Assignee string `bson:"assignee" json:"assignee" yaml:"assignee"` Type string `bson:"type" json:"type" yaml:"type"` Components []string `bson:"components" json:"components" yaml:"components"` Labels []string `bson:"labels" json:"labels" yaml:"labels"` FixVersions []string `bson:"versions" json:"versions" yaml:"versions"` // ... other fields Fields map[string]any `bson:"fields" json:"fields" yaml:"fields"` Callback func(string) `bson:"-" json:"-" yaml:"-"` }
Issue requires project and summary to create a real jira issue. Other fields depend on permissions given to the specific project, and all fields must be legitimate custom fields defined for the project. To see whether you have the right permissions to create an issue with certain fields, check your JIRA interface on the web.