Skip to content

Commit b868203

Browse files
committed
On premise/Status category: Fixed godoc and links to Jira documentation
1 parent 0f08329 commit b868203

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

onpremise/statuscategory.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
// StatusCategoryService handles status categories for the Jira instance / API.
1111
//
1212
// Use it to obtain a list of all status categories and the details of a category.
13-
//
1413
// Status categories provided a mechanism for categorizing statuses.
1514
//
1615
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-status-categories/#api-group-workflow-status-categories
@@ -34,9 +33,9 @@ const (
3433
StatusCategoryUndefined = "undefined"
3534
)
3635

37-
// GetList gets all status categories from Jira
36+
// GetList returns a list of all status categories.
3837
//
39-
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-status-categories/#api-rest-api-2-statuscategory-get
38+
// Jira API docs: https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/statuscategory-getStatusCategories
4039
func (s *StatusCategoryService) GetList(ctx context.Context) ([]StatusCategory, *Response, error) {
4140
apiEndpoint := "/rest/api/2/statuscategory"
4241
req, err := s.client.NewRequest(ctx, http.MethodGet, apiEndpoint, nil)
@@ -49,18 +48,18 @@ func (s *StatusCategoryService) GetList(ctx context.Context) ([]StatusCategory,
4948
if err != nil {
5049
return nil, resp, NewJiraError(resp, err)
5150
}
51+
5252
return statusCategories, resp, nil
5353
}
5454

55-
// Get returns a status category.
55+
// Get returns a full representation of the StatusCategory having the given id or key.
5656
//
57-
// Status categories provided a mechanism for categorizing statuses.
57+
// statusCategoryID represents the ID or key of the status category.
5858
//
59-
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflow-status-categories/#api-rest-api-2-statuscategory-idorkey-get
59+
// Jira API docs: https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/statuscategory-getStatusCategory
6060
func (s *StatusCategoryService) Get(ctx context.Context, statusCategoryID string) (*StatusCategory, *Response, error) {
61-
6261
if statusCategoryID == "" {
63-
return nil, nil, errors.New("jira: not status category set")
62+
return nil, nil, errors.New("no status category id set")
6463
}
6564

6665
apiEndpoint := fmt.Sprintf("/rest/api/2/statuscategory/%v", statusCategoryID)

0 commit comments

Comments
 (0)