forked from forgejo/forgejo
[Vendor] Update xanzy/go-gitlab v0.31.0 => v0.37.0 (#12701)
* update github.com/xanzy/go-gitlab v0.31.0 => v0.37.0 * vendor * adapt changes Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
0ed5e103fe
commit
0c6a802731
44 changed files with 2436 additions and 776 deletions
29
vendor/github.com/xanzy/go-gitlab/group_labels.go
generated
vendored
29
vendor/github.com/xanzy/go-gitlab/group_labels.go
generated
vendored
|
@ -51,6 +51,35 @@ func (s *GroupLabelsService) ListGroupLabels(gid interface{}, opt *ListGroupLabe
|
|||
return l, resp, err
|
||||
}
|
||||
|
||||
// GetGroupLabel get a single label for a given group.
|
||||
//
|
||||
// GitLab API docs:
|
||||
// https://docs.gitlab.com/ce/api/group_labels.html#get-a-single-group-label
|
||||
func (s *GroupLabelsService) GetGroupLabel(gid interface{}, labelID interface{}, options ...RequestOptionFunc) (*GroupLabel, *Response, error) {
|
||||
group, err := parseID(gid)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
label, err := parseID(labelID)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
u := fmt.Sprintf("groups/%s/labels/%s", pathEscape(group), label)
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil, options)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
var l *GroupLabel
|
||||
resp, err := s.client.Do(req, &l)
|
||||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
|
||||
return l, resp, err
|
||||
}
|
||||
|
||||
// CreateGroupLabelOptions represents the available CreateGroupLabel() options.
|
||||
//
|
||||
// GitLab API docs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue