Can't use Custom Label

Hi,
I have create a file in /custom/conf/label/myFile.
I have add some custom label like sample.
reboot gitea
But when i want to add some labels from set i can’t seen my file just default

I do some thing wrong ?
my file content
#fc2929 bug
#cccccc doublon
#84b6eb amélioration
#159818 besoin d’aide
#e6e6e6 invalide
#cc317c question
#ffffff ne sera pas corrigé

You have to take it out of the conf folder. The label folder needs to be custom/options/label. So your file would be found at:

custom/options/label/myFile

Furthermore, the format of your file should be something like:

#ffffff Ne corrigera pas ; Problèmes qui ne seront pas résolus
1 Like

I am trying to do exactly that in order to have a set of labels available everywhere, but with both 1.11.6 and 1.12.2, it does not work. How could I verify, except for using strace? I have tried to create completely new instances from scratch, with an empty database, too, but the label table remains empty. What’s the magic sauce to make this work, please?

Today, I learnt about ‘gitea embedded’, and found the default label configuration.

Now, in ~gitea, I have:

$ find -L . |grep -E ‘label|app.ini’
./gitea/custom/conf/app.ini
./gitea/custom/options/label
./gitea/custom/options/label/Global
./gitea/custom/options/label/Default
./gitea/options/label
./gitea/options/label/Global
./gitea/options/label/Default
./options/label
./options/label/Global
./options/label/Default

That’s because I have symlinked the ‘options’ directory, which is under custom, to the directories where the gitea binary is, and to the gitea home directory, which is one level above:

$ ls -l gitea/gitea
-rwxr-xr-x 1 root root 106954336 Aug 1 17:31 gitea/gitea*

This ‘ls’ command is to show that the ‘custom’ folder is right besides the ‘gitea’ binary, ie. in the default location.

I installed gitea via my Ansible role, which you can fetch from Galaxy, if you want to reproduce.

But I still don’t get why the label file, even if I call it ‘default’, is not being picked up by gitea.

Today, I discovered that I need to import the labels from the “Issues”->“New Issue”->Labels dialogue first, before they will be available. I need to do this on a per-repository level. I have more than 100 repositories already, however small. Is there a way to enable my labels for every (existing) repo by default?

Depending on which version of gitea you are using, recent versions allow you to add the labels at the organization level, meaning, if you have 100 repos under an org, they get access to all the labels under the org.

This does not seem to apply to individual user accounts, however. So if you have the repos under a user, you’d need to create an org, and move the repos to that org.