Skip to content

Commit 7bbec04

Browse files
committed
Add LabelTypeInfo to ProjectInfo
LabelTypeInfo was added sometime in recent revisions. This change adds it to the ProjectInfo struct.
1 parent ebba98a commit 7bbec04

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

projects.go

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,27 @@ type ProjectsService struct {
1313
client *Client
1414
}
1515

16+
// LabelTypeInfo contains information about project labels
17+
//
18+
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#label-type-info
19+
type LabelTypeInfo struct {
20+
Values map[string]string `json:"values",omitempty`
21+
DefaultValue int `json:"default_value",omitempty`
22+
}
23+
1624
// ProjectInfo entity contains information about a project.
1725
//
1826
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#project-info
1927
type ProjectInfo struct {
20-
ID string `json:"id"`
21-
Name string `json:"name"`
22-
Parent string `json:"parent,omitempty"`
23-
Description string `json:"description,omitempty"`
24-
State string `json:"state,omitempty"`
25-
Branches map[string]string `json:"branches,omitempty"`
26-
WebLinks []WebLinkInfo `json:"web_links,omitempty"`
27-
MoreProjects bool `json:"_more_projects,omitempty"`
28+
ID string `json:"id"`
29+
Name string `json:"name"`
30+
Parent string `json:"parent,omitempty"`
31+
Description string `json:"description,omitempty"`
32+
State string `json:"state,omitempty"`
33+
Branches map[string]string `json:"branches,omitempty"`
34+
Labels map[string]LabelTypeInfo `json:"labels,omitempty"`
35+
WebLinks []WebLinkInfo `json:"web_links,omitempty"`
36+
MoreProjects bool `json:"_more_projects,omitempty"`
2837
}
2938

3039
// ProjectInput entity contains information for the creation of a new project.

0 commit comments

Comments
 (0)