Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Resolves #1850 scoped labels in group issue board #1851

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions group_boards.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ type GroupIssueBoardsService struct {
// GitLab API docs:
// https://docs.gitlab.com/ee/api/group_boards.html
type GroupIssueBoard struct {
ID int `json:"id"`
Name string `json:"name"`
Group *Group `json:"group"`
Milestone *Milestone `json:"milestone"`
Lists []*BoardList `json:"lists"`
ID int `json:"id"`
Name string `json:"name"`
Group *Group `json:"group"`
Milestone *Milestone `json:"milestone"`
Labels []*GroupLabel `json:"labels"`
Lists []*BoardList `json:"lists"`
}

func (b GroupIssueBoard) String() string {
Expand Down
41 changes: 41 additions & 0 deletions group_boards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func TestGroupIssueBoardsService_CreateGroupIssueBoard(t *testing.T) {
WebURL: "http://example.com/groups/documentcloud",
},
Milestone: nil,
Labels: []*GroupLabel{},
Lists: []*BoardList{},
}

Expand Down Expand Up @@ -203,6 +204,24 @@ func TestGroupIssueBoardsService_GetGroupIssueBoard(t *testing.T) {
"id": 12,
"title": "10.0"
},
"labels": [
{
"id":1749,
"name":"my-scope1",
"description":null,
"description_html":"",
"text_color":"#FFFFFF",
"color":"#6699cc"
},
{
"id":1747,
"name":"my-scope2",
"description":null,
"description_html":"",
"text_color":"#FFFFFF",
"color":"#FF0000"
}
],
"lists" : [
{
"id" : 1,
Expand Down Expand Up @@ -251,6 +270,20 @@ func TestGroupIssueBoardsService_GetGroupIssueBoard(t *testing.T) {
Title: "10.0",
Description: "",
},
Labels: []*GroupLabel{
{
ID: 1749,
Name: "my-scope1",
TextColor: "#FFFFFF",
Color: "#6699cc",
},
{
ID: 1747,
Name: "my-scope2",
TextColor: "#FFFFFF",
Color: "#FF0000",
},
},
Lists: []*BoardList{
{
ID: 1,
Expand Down Expand Up @@ -364,6 +397,14 @@ func TestGroupIssueBoardsService_UpdateIssueBoard(t *testing.T) {
State: "active",
WebURL: "http://example.com/groups/documentcloud/-/milestones/1",
},
Labels: []*GroupLabel{
{
ID: 11,
Name: "GroupLabel",
Color: "#428BCA",
Description: "",
},
},
Lists: []*BoardList{},
}

Expand Down
Loading