Documentation
¶
Index ¶
- Constants
- func AddComment(qc QueryContext, issueID, body string) (_ *work.IssueComment, rerr error)
- func AssignUser(qc QueryContext, issueID, accountID string) error
- func ConvertComment(qc QueryContext, data CommentResponse, issueIDOrKeyOptional string, ...) (_ *work.IssueComment, rerr error)
- func EditPriority(qc QueryContext, issueID, priorityID string) error
- func EditStatus(qc QueryContext, issueID, transitionID string, fieldValues map[string]string) error
- func EditTitle(qc QueryContext, issueID, title string) error
- func GetIssueTransitions(qc QueryContext, issueID string) (res []mutate.IssueTransition, rerr error)
- func IssueTypes(qc QueryContext) (res []work.IssueType, rerr error)
- func IssuesAndChangelogsPage(qc QueryContext, project Project, fieldByID map[string]CustomField, ...) (pi PageInfo, resIssues []IssueWithCustomFields, rerr error)
- func Labels(qc QueryContext) (res []string, rerr error)
- func PaginateStartAt(fn PaginateStartAtFn) error
- func ParsePlannedDate(ts string) (time.Time, error)
- func ParseTime(ts string) (time.Time, error)
- func Priorities(qc QueryContext) (res []work.IssuePriority, rerr error)
- func Resolution(qc QueryContext) (res []string, rerr error)
- func ServerVersion(qc QueryContext) (serverVersion string, err error)
- type AllowedValue
- type Avatars
- type CommentResponse
- type CustomField
- type CustomFieldValue
- type Field
- type IssueKeys
- type IssueWithCustomFields
- type PageInfo
- type PaginateStartAtFn
- type Project
- type QueryContext
- func (s QueryContext) IssueCommentURL(issueKey string, commentID string) string
- func (s QueryContext) IssueID(refID string) string
- func (s QueryContext) IssueURL(issueKey string) string
- func (s QueryContext) ProjectID(refID string) string
- func (s QueryContext) ProjectURL(projectKey string) string
- func (s QueryContext) SprintID(refID string) string
- func (s QueryContext) UserID(refID string) string
- func (s QueryContext) Validate()
- type Requester
- type StatusDetail
- type User
- type UserGroup
Constants ¶
View Source
const IssueCommentsExpandParam = "renderedBody"
Variables ¶
This section is empty.
Functions ¶
func AddComment ¶
func AddComment(qc QueryContext, issueID, body string) (_ *work.IssueComment, rerr error)
func AssignUser ¶
func AssignUser(qc QueryContext, issueID, accountID string) error
func ConvertComment ¶
func ConvertComment(qc QueryContext, data CommentResponse, issueIDOrKeyOptional string, issueKeysOptional *IssueKeys) (_ *work.IssueComment, rerr error)
func EditPriority ¶
func EditPriority(qc QueryContext, issueID, priorityID string) error
func EditStatus ¶
func EditStatus(qc QueryContext, issueID, transitionID string, fieldValues map[string]string) error
func EditTitle ¶
func EditTitle(qc QueryContext, issueID, title string) error
func GetIssueTransitions ¶
func GetIssueTransitions(qc QueryContext, issueID string) (res []mutate.IssueTransition, rerr error)
func IssueTypes ¶
func IssueTypes(qc QueryContext) (res []work.IssueType, rerr error)
func IssuesAndChangelogsPage ¶
func IssuesAndChangelogsPage( qc QueryContext, project Project, fieldByID map[string]CustomField, updatedSince time.Time, paginationParams url.Values) ( pi PageInfo, resIssues []IssueWithCustomFields, rerr error)
IssuesAndChangelogsPage returns issues and related changelogs. Calls qc.ExportUser for each user. Current difference from jira-cloud version is that user.Key is used instead of user.AccountID everywhere.
func Labels ¶
func Labels(qc QueryContext) (res []string, rerr error)
func PaginateStartAt ¶
func PaginateStartAt(fn PaginateStartAtFn) error
func Priorities ¶
func Priorities(qc QueryContext) (res []work.IssuePriority, rerr error)
func Resolution ¶
func Resolution(qc QueryContext) (res []string, rerr error)
func ServerVersion ¶
func ServerVersion(qc QueryContext) (serverVersion string, err error)
Types ¶
type AllowedValue ¶
type Avatars ¶
type Avatars struct {
XSmall string `json:"16x16"`
Small string `json:"24x24"`
Medium string `json:"32x32"`
Large string `json:"48x48"`
}
Avatars is a type that describes a set of avatar image properties
type CommentResponse ¶
type CommentResponse struct {
Self string `json:"self"`
ID string `json:"id"`
Author struct {
Key string `json:"key"` // hosted,cloud
AccountID string `json:"accountID"` // cloud only
} `json:"author"`
RenderedBody string `json:"renderedBody"`
Created string `json:"created"`
Updated string `json:"updated"`
}
type CustomField ¶
type CustomFieldValue ¶
type Field ¶
type Field struct {
Key string `json:"key"`
Name string `json:"name"`
Required bool `json:"required"`
AllowedValues []AllowedValue `json:"allowedValues"`
}
type IssueKeys ¶
func GetIssueKeys ¶
func GetIssueKeys(qc QueryContext, issueIDOrKey string) (res IssueKeys, rerr error)
type IssueWithCustomFields ¶
type IssueWithCustomFields struct {
*work.Issue
CustomFields []CustomFieldValue
}
func IssueByID ¶
func IssueByID(qc QueryContext, issueIDOrKey string) (_ IssueWithCustomFields, rerr error)
BUG: returned data will have missing start and end date, because we don't pass fieldsByID here Will also be missing story points and epic link
type PageInfo ¶
func IssueComments ¶
func IssueComments( qc QueryContext, project Project, issueRefID string, issueKey string, paginationParams url.Values) (pi PageInfo, resIssueComments []*work.IssueComment, rerr error)
type PaginateStartAtFn ¶
type QueryContext ¶
type QueryContext struct {
WebsiteURL string
Logger hclog.Logger
CustomerID string
ExportUser func(user User) error
Req Requester
IsOnPremise bool
}
func (QueryContext) IssueCommentURL ¶
func (s QueryContext) IssueCommentURL(issueKey string, commentID string) string
func (QueryContext) IssueID ¶
func (s QueryContext) IssueID(refID string) string
func (QueryContext) IssueURL ¶
func (s QueryContext) IssueURL(issueKey string) string
func (QueryContext) ProjectID ¶
func (s QueryContext) ProjectID(refID string) string
func (QueryContext) ProjectURL ¶
func (s QueryContext) ProjectURL(projectKey string) string
func (QueryContext) SprintID ¶
func (s QueryContext) SprintID(refID string) string
func (QueryContext) UserID ¶
func (s QueryContext) UserID(refID string) string
func (QueryContext) Validate ¶
func (s QueryContext) Validate()
type Requester ¶
type Requester interface {
// Get and Get2 are for Get requests only
Get(objPath string, params url.Values, res interface{}) error
Get2(objPath string, params url.Values, res interface{}) (statusCode int, _ error)
// JSON supports more configuration of request params
JSON(req requests2.Request, res interface{}) (_ requests2.Result, rerr error)
URL(objPath string) string
}
type StatusDetail ¶
type StatusDetail struct {
Name string `json:"name"`
StatusCategory struct {
Key string `json:"key"`
Name string `json:"name"`
} `json:"statusCategory"`
}
func StatusWithDetail ¶
func StatusWithDetail(qc QueryContext) (_ []StatusDetail, names []string, _ error)
type User ¶
type User struct {
// AccountID not available in hosted jira.
AccountID string `json:"accountId"`
Self string `json:"self"`
Name string `json:"name"`
Key string `json:"key"`
EmailAddress string `json:"emailAddress"`
Avatars Avatars `json:"avatarUrls"`
DisplayName string `json:"displayName"`
Active bool `json:"active"`
Timezone string `json:"timeZone"`
Groups struct {
Groups []UserGroup `json:"items,omitempty"`
} `json:"groups"`
}
Click to show internal directories.
Click to hide internal directories.