Commit a5bbf613 authored by Ulrich Schreiner's avatar Ulrich Schreiner

additional fields in Gitlab

parent aa5db79a
......@@ -33,8 +33,12 @@ type LabelsService struct {
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html
type Label struct {
Name string `json:"name"`
Color string `json:"color"`
Name string `json:"name"`
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 {
......@@ -69,8 +73,9 @@ func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error)
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#create-a-new-label
type CreateLabelOptions struct {
Name string `url:"name,omitempty" json:"name,omitempty"`
Color string `url:"color,omitempty" json:"color,omitempty"`
Name string `url:"name,omitempty" json:"name,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
......@@ -134,9 +139,10 @@ func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*
//
// GitLab API docs: http://doc.gitlab.com/ce/api/labels.html#delete-a-label
type UpdateLabelOptions struct {
Name string `url:"name,omitempty" json:"name,omitempty"`
NewName string `url:"new_name,omitempty" json:"new_name,omitempty"`
Color string `url:"color,omitempty" json:"color,omitempty"`
Name string `url:"name,omitempty" json:"name,omitempty"`
NewName string `url:"new_name,omitempty" json:"new_name,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
......
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