mirror of https://gitlab.com/gitlab-org/cli.git
Add group issue board api functions
This commit is contained in:
parent
f96841dbbc
commit
dedd6c2074
24
api/board.go
24
api/board.go
|
@ -26,6 +26,18 @@ var ListIssueBoards = func(client *gitlab.Client, projectID interface{}, opts *g
|
|||
return boards, nil
|
||||
}
|
||||
|
||||
var ListGroupIssueBoards = func(client *gitlab.Client, groupID interface{}, opts *gitlab.ListGroupIssueBoardsOptions) ([]*gitlab.GroupIssueBoard, error) {
|
||||
if client == nil {
|
||||
client = apiClient.Lab()
|
||||
}
|
||||
boards, _, err := client.GroupIssueBoards.ListGroupIssueBoards(groupID, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return boards, nil
|
||||
}
|
||||
|
||||
var GetIssueBoardLists = func(client *gitlab.Client, projectID interface{}, boardID int, opts *gitlab.GetIssueBoardListsOptions) ([]*gitlab.BoardList, error) {
|
||||
if client == nil {
|
||||
client = apiClient.Lab()
|
||||
|
@ -37,3 +49,15 @@ var GetIssueBoardLists = func(client *gitlab.Client, projectID interface{}, boar
|
|||
|
||||
return boardLists, nil
|
||||
}
|
||||
|
||||
var GetGroupIssueBoardLists = func(client *gitlab.Client, groupID interface{}, boardID int, opts *gitlab.ListGroupIssueBoardListsOptions) ([]*gitlab.BoardList, error) {
|
||||
if client == nil {
|
||||
client = apiClient.Lab()
|
||||
}
|
||||
boardLists, _, err := client.GroupIssueBoards.ListGroupIssueBoardLists(groupID, boardID, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return boardLists, nil
|
||||
}
|
||||
|
|
|
@ -73,6 +73,17 @@ var ListGroupProjects = func(client *gitlab.Client, groupID interface{}, opts *g
|
|||
return project, nil
|
||||
}
|
||||
|
||||
var ListProjectsGroups = func(client *gitlab.Client, projectID interface{}, opts *gitlab.ListProjectGroupOptions) ([]*gitlab.ProjectGroup, error) {
|
||||
if client == nil {
|
||||
client = apiClient.Lab()
|
||||
}
|
||||
groups, _, err := client.Projects.ListProjectsGroups(projectID, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
var ListProjectMembers = func(client *gitlab.Client, projectID interface{}, opts *gitlab.ListProjectMembersOptions) ([]*gitlab.ProjectMember, error) {
|
||||
if client == nil {
|
||||
client = apiClient.Lab()
|
||||
|
|
Loading…
Reference in New Issue