Commit a5bbf613 authored by Ulrich Schreiner's avatar Ulrich Schreiner

additional fields in Gitlab

parent aa5db79a
...@@ -35,6 +35,10 @@ type LabelsService struct { ...@@ -35,6 +35,10 @@ type LabelsService struct {
type Label struct { type Label struct {
Name string `json:"name"` Name string `json:"name"`
Color string `json:"color"` Color string `json:"color"`
Description string `json:"description"`
OpenIssuesCount int `json:"open_issues_count"`
ClosedIssuesCount int `json:"closed_issues_count"`
OpenMergeRequestsCount int `json:"open_merge_requests_count"`
} }
func (l Label) String() string { func (l Label) String() string {
...@@ -71,6 +75,7 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) ...@@ -71,6 +75,7 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error)
type CreateLabelOptions struct { type CreateLabelOptions struct {
Name string `url:"name,omitempty" json:"name,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"`
Color string `url:"color,omitempty" json:"color,omitempty"` Color string `url:"color,omitempty" json:"color,omitempty"`
Description string `url:"description,omitempty" json:"description,omitempty"`
} }
// CreateLabel creates a new label for given repository with given name and // CreateLabel creates a new label for given repository with given name and
...@@ -137,6 +142,7 @@ type UpdateLabelOptions struct { ...@@ -137,6 +142,7 @@ type UpdateLabelOptions struct {
Name string `url:"name,omitempty" json:"name,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"`
NewName string `url:"new_name,omitempty" json:"new_name,omitempty"` NewName string `url:"new_name,omitempty" json:"new_name,omitempty"`
Color string `url:"color,omitempty" json:"color,omitempty"` Color string `url:"color,omitempty" json:"color,omitempty"`
Description string `url:"description,omitempty" json:"description,omitempty"`
} }
// UpdateLabel updates an existing label with new name or now color. At least // UpdateLabel updates an existing label with new name or now color. At least
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment