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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
27 deletions
+35
-27
issues.go
issues.go
+32
-26
merge_requests.go
merge_requests.go
+3
-1
No files found.
issues.go
View file @
0de9a841
...
@@ -37,38 +37,40 @@ type IssuesService struct {
...
@@ -37,38 +37,40 @@ type IssuesService struct {
//
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html
type
Issue
struct
{
type
Issue
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
IID
int
`json:"iid"`
IID
int
`json:"iid"`
ProjectID
int
`json:"project_id"`
ProjectID
int
`json:"project_id"`
Title
string
`json:"title"`
Milestone
*
Milestone
`json:"milestone"`
Description
string
`json:"description"`
Author
struct
{
Labels
[]
string
`json:"labels"`
Milestone
*
Milestone
`json:"milestone"`
Assignee
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
Username
string
`json:"username"`
Username
string
`json:"username"`
Email
string
`json:"email"`
Email
string
`json:"email"`
Name
string
`json:"name"`
Name
string
`json:"name"`
State
string
`json:"state"`
State
string
`json:"state"`
CreatedAt
*
time
.
Time
`json:"created_at"`
CreatedAt
*
time
.
Time
`json:"created_at"`
}
`json:"assignee"`
}
`json:"author"`
Author
struct
{
Description
string
`json:"description"`
State
string
`json:"state"`
Assignee
struct
{
ID
int
`json:"id"`
ID
int
`json:"id"`
Username
string
`json:"username"`
Username
string
`json:"username"`
Email
string
`json:"email"`
Email
string
`json:"email"`
Name
string
`json:"name"`
Name
string
`json:"name"`
State
string
`json:"state"`
State
string
`json:"state"`
CreatedAt
*
time
.
Time
`json:"created_at"`
CreatedAt
*
time
.
Time
`json:"created_at"`
}
`json:"author"`
}
`json:"assignee"`
State
string
`json:"state"`
Labels
[]
string
`json:"labels"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
Title
string
`json:"title"`
CreatedAt
*
time
.
Time
`json:"created_at"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
Subscribed
bool
`json:"subscribed"`
CreatedAt
*
time
.
Time
`json:"created_at"`
UserNotesCount
int
`json:"user_notes_count"`
ClosedAt
*
time
.
Time
`json:"closed_at"`
Confidential
bool
`json:"confidential"`
Subscribed
bool
`json:"subscribed"`
DueDate
string
`json:"due_date"`
UserNotesCount
int
`json:"user_notes_count"`
WebURL
string
`json:"web_url"`
DueDate
*
ISOTime
`json:"due_date"`
TimeStats
TimeStats
`json:"time_stats"`
WebURL
string
`json:"web_url"`
TimeStats
*
TimeStats
`json:"time_stats"`
Confidential
bool
`json:"confidential"`
DiscussionLocked
bool
`json:"discussion_locked"`
}
}
func
(
i
Issue
)
String
()
string
{
func
(
i
Issue
)
String
()
string
{
...
@@ -236,12 +238,16 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFu
...
@@ -236,12 +238,16 @@ func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFu
//
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
type
CreateIssueOptions
struct
{
type
CreateIssueOptions
struct
{
Title
*
string
`url:"title,omitempty" json:"title,omitempty"`
Title
*
string
`url:"title,omitempty" json:"title,omitempty"`
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
AssigneeID
*
int
`url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
Confidential
*
bool
`url:"confidential,omitempty" json:"confidential,omitempty"`
CreatedAt
*
time
.
Time
`url:"created_at,omitempty" json:"created_at,omitempty"`
AssigneeIDs
[]
int
`url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
MilestoneID
*
int
`url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
MilestoneID
*
int
`url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
Labels
Labels
`url:"labels,comma,omitempty" json:"labels,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.
// CreateIssue creates a new project issue.
...
...
merge_requests.go
View file @
0de9a841
...
@@ -318,7 +318,8 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
...
@@ -318,7 +318,8 @@ func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequ
return
m
,
resp
,
err
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:
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-issues-that-will-close-on-merge
// 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
...
@@ -333,6 +334,7 @@ func (s *MergeRequestsService) GetIssuesClosedOnMerge(pid interface{}, mergeRequ
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
err
return
nil
,
nil
,
err
}
}
var
i
[]
*
Issue
var
i
[]
*
Issue
resp
,
err
:=
s
.
client
.
Do
(
req
,
&
i
)
resp
,
err
:=
s
.
client
.
Do
(
req
,
&
i
)
if
err
!=
nil
{
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