Update Vendors (#145)
vendor go update vendors Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/145 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
5
vendor/code.gitea.io/sdk/gitea/issue_label.go
generated
vendored
5
vendor/code.gitea.io/sdk/gitea/issue_label.go
generated
vendored
@@ -49,6 +49,11 @@ type CreateLabelOption struct {
|
||||
|
||||
// CreateLabel create one label of repository
|
||||
func (c *Client) CreateLabel(owner, repo string, opt CreateLabelOption) (*Label, error) {
|
||||
if len(opt.Color) == 6 {
|
||||
if err := c.CheckServerVersionConstraint(">=1.12.0"); err != nil {
|
||||
opt.Color = "#" + opt.Color
|
||||
}
|
||||
}
|
||||
body, err := json.Marshal(&opt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user