mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-04-21 12:07:01 +02:00
go doc and go lint
This commit is contained in:
parent
a2df25c45a
commit
f1a11a0302
4
board.go
4
board.go
@ -100,7 +100,7 @@ func (s *BoardService) GetBoard(boardID int) (*Board, *Response, error) {
|
|||||||
return board, resp, nil
|
return board, resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates a new board. Board name, type and filter Id is required.
|
// CreateBoard creates a new board. Board name, type and filter Id is required.
|
||||||
// name - Must be less than 255 characters.
|
// name - Must be less than 255 characters.
|
||||||
// type - Valid values: scrum, kanban
|
// type - Valid values: scrum, kanban
|
||||||
// filterId - Id of a filter that the user has permissions to view.
|
// filterId - Id of a filter that the user has permissions to view.
|
||||||
@ -124,7 +124,7 @@ func (s *BoardService) CreateBoard(board *Board) (*Board, *Response, error) {
|
|||||||
return responseBoard, resp, nil
|
return responseBoard, resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete will delete an agile board.
|
// DeleteBoard will delete an agile board.
|
||||||
//
|
//
|
||||||
// JIRA API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-deleteBoard
|
// JIRA API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-deleteBoard
|
||||||
func (s *BoardService) DeleteBoard(boardID int) (*Board, *Response, error) {
|
func (s *BoardService) DeleteBoard(boardID int) (*Board, *Response, error) {
|
||||||
|
6
issue.go
6
issue.go
@ -183,7 +183,7 @@ type Time time.Time
|
|||||||
|
|
||||||
// Wrapper struct for search result
|
// Wrapper struct for search result
|
||||||
type transitionResult struct {
|
type transitionResult struct {
|
||||||
Transitions []Transition `json:transitions`
|
Transitions []Transition `json:"transitions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transition represents an issue transition in JIRA
|
// Transition represents an issue transition in JIRA
|
||||||
@ -193,15 +193,17 @@ type Transition struct {
|
|||||||
Fields map[string]TransitionField `json:"fields"`
|
Fields map[string]TransitionField `json:"fields"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TransitionField represents the value of one Transistion
|
||||||
type TransitionField struct {
|
type TransitionField struct {
|
||||||
Required bool `json:"required"`
|
Required bool `json:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreatePayload is used for creating new issue transitions
|
// CreateTransitionPayload is used for creating new issue transitions
|
||||||
type CreateTransitionPayload struct {
|
type CreateTransitionPayload struct {
|
||||||
Transition TransitionPayload `json:"transition"`
|
Transition TransitionPayload `json:"transition"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TransitionPayload represents the request payload of Transistion calls like DoTransition
|
||||||
type TransitionPayload struct {
|
type TransitionPayload struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@ func TestIssueService_DoTransition(t *testing.T) {
|
|||||||
var payload CreateTransitionPayload
|
var payload CreateTransitionPayload
|
||||||
err := decoder.Decode(&payload)
|
err := decoder.Decode(&payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Got error: %v", err)
|
t.Errorf("Got error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if payload.Transition.ID != transitionID {
|
if payload.Transition.ID != transitionID {
|
||||||
@ -462,6 +462,6 @@ func TestIssueService_DoTransition(t *testing.T) {
|
|||||||
_, err := testClient.Issue.DoTransition("123", transitionID)
|
_, err := testClient.Issue.DoTransition("123", transitionID)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Got error: %v", err)
|
t.Errorf("Got error: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ func TestSprintService_MoveIssuesToSprint(t *testing.T) {
|
|||||||
var payload IssuesWrapper
|
var payload IssuesWrapper
|
||||||
err := decoder.Decode(&payload)
|
err := decoder.Decode(&payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Got error: %v", err)
|
t.Errorf("Got error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if payload.Issues[0] != issuesToMove[0] {
|
if payload.Issues[0] != issuesToMove[0] {
|
||||||
@ -32,6 +32,6 @@ func TestSprintService_MoveIssuesToSprint(t *testing.T) {
|
|||||||
_, err := testClient.Sprint.MoveIssuesToSprint(123, issuesToMove)
|
_, err := testClient.Sprint.MoveIssuesToSprint(123, issuesToMove)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Got error: %v", err)
|
t.Errorf("Got error: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user