Support using label names when changing issue labels (#30943)
Resolve #30917
Make the APIs for adding labels and replacing labels support both label
IDs and label names so the
[`actions/labeler`](https://github.com/actions/labeler) action can work
in Gitea.
<img width="600px"
src="7835c771
-f637-4c57-9ce5-e4fbf56fa0d3"
/>
This commit is contained in:
parent
2442ead680
commit
b3beaed147
4 changed files with 84 additions and 10 deletions
|
@ -47,8 +47,9 @@ type EditLabelOption struct {
|
|||
|
||||
// IssueLabelsOption a collection of labels
|
||||
type IssueLabelsOption struct {
|
||||
// list of label IDs
|
||||
Labels []int64 `json:"labels"`
|
||||
// Labels can be a list of integers representing label IDs
|
||||
// or a list of strings representing label names
|
||||
Labels []any `json:"labels"`
|
||||
}
|
||||
|
||||
// LabelTemplate info of a Label template
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue