File-based labels system #11622

Open
opened 2025-11-02 09:42:42 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Andre601 on GitHub (Sep 10, 2023).

Feature Description

The current label system gitea offers is nice (And effectively the same to GitHub with some extras), but it can also become a quite tedious task to update them, should you update multiple at the same time.

As an example, say you have multiple Staus/... labels used for indicating the state of an issue or PR. All have the same colour to group them together like that.

Now you want to change the colours of these labels. What you need to do is to go to each one, press the edit button, change the colour and save the change.
Depending on how fast the repo host is you have can this take quite a while to update them all, which is just frustrating.

Because of this would I like to propose a file-based labels system.

It's somewhat simple to understand:
A user with push rights can make a .gitea/labels.yml file and populate it with values like this:

"Type/Bug":
  color: 'ff0000'
  exclusive: true # Optional. Defaults to false.
"Type/Enhancement":
  color: '00ff00'
  exclusive: true # Optional. Defaults to false.
"Good first issue":
  color: '0000ff'
  exclusive: false # Optional. Defaults to false.

This would add the labels Type/Bug with color #ff0000 and being exclusive, Type/Enhancement with color #00ff00 and being exclusive and Good first issue with color #0000ff and not being exclusive.

It would allow us to update multiple labels simultaneiously by editing this file once with all the changes needed.
The web UI could still be supported by pulling the info from the YAML file and displaying it.

Further would I propose the addition of new settings for labels to limit on what type they can be applied: Issue and/or PR.
This would make it easier to find the labels you want to apply by hiding those not suited nor needed for the thing you apply it on.

Screenshots

No response

Originally created by @Andre601 on GitHub (Sep 10, 2023). ### Feature Description The current label system gitea offers is nice (And effectively the same to GitHub with some extras), but it can also become a quite tedious task to update them, should you update multiple at the same time. As an example, say you have multiple `Staus/...` labels used for indicating the state of an issue or PR. All have the same colour to group them together like that. Now you want to change the colours of these labels. What you need to do is to go to each one, press the edit button, change the colour and save the change. Depending on how fast the repo host is you have can this take quite a while to update them all, which is just frustrating. Because of this would I like to propose a file-based labels system. It's somewhat simple to understand: A user with push rights can make a `.gitea/labels.yml` file and populate it with values like this: ```yaml "Type/Bug": color: 'ff0000' exclusive: true # Optional. Defaults to false. "Type/Enhancement": color: '00ff00' exclusive: true # Optional. Defaults to false. "Good first issue": color: '0000ff' exclusive: false # Optional. Defaults to false. ``` This would add the labels `Type/Bug` with color `#ff0000` and being exclusive, `Type/Enhancement` with color `#00ff00` and being exclusive and `Good first issue` with color `#0000ff` and not being exclusive. It would allow us to update multiple labels simultaneiously by editing this file once with all the changes needed. The web UI could still be supported by pulling the info from the YAML file and displaying it. Further would I propose the addition of new settings for labels to limit on what type they can be applied: Issue and/or PR. This would make it easier to find the labels you want to apply by hiding those not suited nor needed for the thing you apply it on. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:42:42 -06:00
Author
Owner

@a1012112796 commented on GitHub (Sep 11, 2023):

I think it's better to do it by actions or oauth app.

@a1012112796 commented on GitHub (Sep 11, 2023): I think it's better to do it by actions or oauth app.
Author
Owner

@Andre601 commented on GitHub (Sep 11, 2023):

Both have their downsides:

  • Actions: not every instance may have those enabled. Especially when self-hosting and you don't have the infra for it.
  • OAuth: Requires pre-existing app, which - again - may not be a possible thing to host yourself.

Just having a way to edit multiple labels at once to reduce numbers of calls from and to the site (and api) would be good.

@Andre601 commented on GitHub (Sep 11, 2023): Both have their downsides: - Actions: not every instance may have those enabled. Especially when self-hosting and you don't have the infra for it. - OAuth: Requires pre-existing app, which - again - may not be a possible thing to host yourself. Just having a way to edit multiple labels at once to reduce numbers of calls from and to the site (and api) would be good.
Author
Owner

@Andre601 commented on GitHub (Sep 11, 2023):

Also, I hope that the other suggestion - That about an option to limit a label to issues and/or PRs only - could be considered as I believe this could help declutter the list on repos which have labels for all kinds of things.

@Andre601 commented on GitHub (Sep 11, 2023): Also, I hope that the other suggestion - That about an option to limit a label to issues and/or PRs only - could be considered as I believe this could help declutter the list on repos which have labels for all kinds of things.
Author
Owner

@chxseh commented on GitHub (Jun 11, 2025):

I'd love to see this, I'd be willing to put up a bounty as well.

Looks like label endpoints are missing from Gitea's API (GH Ref), so actions like Label Sync would solve this (although may need a custom solution for some of the Gitea specific features)

@chxseh commented on GitHub (Jun 11, 2025): I'd love to see this, I'd be willing to put up a bounty as well. Looks like label endpoints are missing from Gitea's API [(GH Ref)](https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#list-labels-for-a-repository), so actions like [Label Sync](https://github.com/marketplace/actions/label-sync) would solve this (although may need a custom solution for some of the Gitea specific features)
Author
Owner

@chxseh commented on GitHub (Jun 11, 2025):

/bounty $15

@chxseh commented on GitHub (Jun 11, 2025): /bounty $15
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11622