2019-05-11 12:21:34 +02:00
|
|
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
2019-06-16 14:39:52 +02:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
2022-11-27 19:20:29 +01:00
|
|
|
// SPDX-License-Identifier: MIT
|
2019-05-11 12:21:34 +02: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 14:39:52 +02:00
|
|
|
Color string `json:"color"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
URL string `json:"url"`
|
2019-05-11 12:21:34 +02: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 15:33:03 +01:00
|
|
|
Color string `json:"color" binding:"Required"`
|
2019-06-16 14:39:52 +02:00
|
|
|
Description string `json:"description"`
|
2019-05-11 12:21:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// EditLabelOption options for editing a label
|
|
|
|
type EditLabelOption struct {
|
2019-06-16 14:39:52 +02:00
|
|
|
Name *string `json:"name"`
|
|
|
|
Color *string `json:"color"`
|
|
|
|
Description *string `json:"description"`
|
2019-05-11 12:21:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// IssueLabelsOption a collection of labels
|
|
|
|
type IssueLabelsOption struct {
|
|
|
|
// list of label IDs
|
|
|
|
Labels []int64 `json:"labels"`
|
|
|
|
}
|