Commit 0de9a841 authored by Sander van Harmelen's avatar Sander van Harmelen

Add missing fields to issues structs

parent 06b1711a
......@@ -40,35 +40,37 @@ type Issue struct {
ID int `json:"id"`
IID int `json:"iid"`
ProjectID int `json:"project_id"`
Title string `json:"title"`
Description string `json:"description"`
Labels []string `json:"labels"`
Milestone *Milestone `json:"milestone"`
Assignee struct {
Author struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Name string `json:"name"`
State string `json:"state"`
CreatedAt *time.Time `json:"created_at"`
} `json:"assignee"`
Author struct {
} `json:"author"`
Description string `json:"description"`
State string `json:"state"`
Assignee struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Name string `json:"name"`
State string `json:"state"`
CreatedAt *time.Time `json:"created_at"`
} `json:"author"`
State string `json:"state"`
} `json:"assignee"`
Labels []string `json:"labels"`
Title string `json:"title"`
UpdatedAt *time.Time `json:"updated_at"`
CreatedAt *time.Time `json:"created_at"`
ClosedAt *time.Time `json:"closed_at"`
Subscribed bool `json:"subscribed"`
UserNotesCount int `json:"user_notes_count"`
Confidential bool `json:"confidential"`
DueDate string `json:"due_date"`
DueDate *ISOTime `json:"due_date"`
WebURL string `json:"web_url"`
TimeStats TimeStats `json:"time_stats"`
TimeStats *TimeStats `json:"time_stats"`
Confidential bool `json:"confidential"`
DiscussionLocked bool `json:"discussion_locked"`
}
func (i Issue) String() string {
......@@ -238,10 +240,14 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFu
type CreateIssueOptions struct {
Title *string `url:"title,omitempty" json:"title,omitempty"`
Description *string `url:"description,omitempty" json:"description,omitempty"`
AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
Confidential *bool `url:"confidential,omitempty" json:"confidential,omitempty"`
AssigneeIDs []int `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
MilestoneID *int `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
Labels Labels `url:"labels,comma,omitempty" json:"labels,omitempty"`
CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
MergeRequestToResolveDiscussionsOf *int `url:"merge_request_to_resolve_discussions_of,omitempty" json:"merge_request_to_resolve_discussions_of,omitempty"`
DiscussionToResolve *string `url:"discussion_to_resolve,omitempty" json:"discussion_to_resolve,omitempty"`
}
// CreateIssue creates a new project issue.
......
......@@ -318,7 +318,8 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
return m, resp, err
}
// GetIssuesClosedOnMerge Get all the issues that would be closed by merging the provided merge request.
// GetIssuesClosedOnMerge gets all the issues that would be closed by merging the
// provided merge request.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-issues-that-will-close-on-merge
......@@ -333,6 +334,7 @@ func (s *MergeRequestsService) GetIssuesClosedOnMerge(pid interface{}, mergeRequ
if err != nil {
return nil, nil, err
}
var i []*Issue
resp, err := s.client.Do(req, &i)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment