aboutsummaryrefslogtreecommitdiffstats
path: root/modules/label
Commit message (Collapse)AuthorAgeFilesLines
* Make label templates have consistent behavior and priority (#23749)wxiaoguang2023-04-101-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/issues/23715 Other related PRs: * #23717 * #23716 * #23719 This PR is different from others, it tries to resolve the problem fundamentally (and brings more benefits) Although it looks like some more lines are added, actually many new lines are for tests. ---- Before, the code was just "guessing" the file type and try to parse them. <details> ![image](https://user-images.githubusercontent.com/2114189/228002245-57d58e27-1078-4da9-bf42-5bc0b264c6ce.png) </details> This PR: * Always remember the original option file names, and always use correct parser for them. * Another benefit is that we can sort the Label Templates now (before there was a map, its key order is undefined) ![image](https://user-images.githubusercontent.com/2114189/228002432-931b9f18-3908-484b-a36b-04760c9ad132.png)
* Reduce duplicate and useless code in options (#23369)Jason Song2023-03-081-3/+3
| | | | | | | | Avoid maintaining two copies of code, some functions can be used with both `bindata` and `no bindata`. And removed `GetRepoInitFile`, it's useless now. `Readme`/`Gitignore`/`License`/`Labels` will clean the name and use custom files when available.
* Add loading yaml label template files (#22976)Lauris BH2023-03-023-0/+244
Extract from #11669 and enhancement to #22585 to support exclusive scoped labels in label templates * Move label template functionality to label module * Fix handling of color codes * Add Advanced label template