Skip to content

Commit

Permalink
Merge pull request #1851 from giuliohome/master
Browse files Browse the repository at this point in the history
Resolves #1850 scoped labels in group issue board
  • Loading branch information
svanharmelen authored Dec 9, 2023
2 parents 62bfc4a + 3ceb86d commit c26aaf2
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
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

0 comments on commit c26aaf2

Please sign in to comment.