Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
0de9a841
Commit
0de9a841
authored
Nov 29, 2017
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing fields to issues structs
parent
06b1711a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
issues.go
issues.go
+19
-13
merge_requests.go
merge_requests.go
+3
-1
No files found.
issues.go
View file @
0de9a841
...
...
@@ -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"`
A
ssignee
struct
{
A
uthor
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.
...
...
merge_requests.go
View file @
0de9a841
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment