2019-05-11 10:21:34 +00:00
|
|
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
2019-06-16 12:39:52 +00:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
2022-11-27 18:20:29 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2019-05-11 10:21:34 +00:00
|
|
|
|
|
|
|
package structs
|
|
|
|
|
|
|
|
// Label a label to an issue or a pr
|
|
|
|
// swagger:model
|
|
|
|
type Label struct {
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
// example: 00aabb
|
2019-06-16 12:39:52 +00:00
|
|
|
Color string `json:"color"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
URL string `json:"url"`
|
2019-05-11 10:21:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreateLabelOption options for creating a label
|
|
|
|
type CreateLabelOption struct {
|
|
|
|
// required:true
|
|
|
|
Name string `json:"name" binding:"Required"`
|
|
|
|
// required:true
|
|
|
|
// example: #00aabb
|
2020-02-09 14:33:03 +00:00
|
|
|
Color string `json:"color" binding:"Required"`
|
2019-06-16 12:39:52 +00:00
|
|
|
Description string `json:"description"`
|
2019-05-11 10:21:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EditLabelOption options for editing a label
|
|
|
|
type EditLabelOption struct {
|
2019-06-16 12:39:52 +00:00
|
|
|
Name *string `json:"name"`
|
|
|
|
Color *string `json:"color"`
|
|
|
|
Description *string `json:"description"`
|
2019-05-11 10:21:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// IssueLabelsOption a collection of labels
|
|
|
|
type IssueLabelsOption struct {
|
|
|
|
// list of label IDs
|
|
|
|
Labels []int64 `json:"labels"`
|
|
|
|
}
|