label template dropdown list directories #8046

Closed
opened 2025-11-02 07:52:14 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @volker-raschek on GitHub (Oct 30, 2021).

Gitea Version

v1.15.3

Git Version

No response

Operating System

No response

How are you running Gitea?

Via kubernetes v1.22.2

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Hi, I added a feature request for the helm chart of gitea to support the creation of custom gitignores, repository labels, licenses and README files - official documentation. The files are added via a config map into the file system. Kubernetes creates additionally a directory named data with a timestamp. This directory is listed in the drop down menue of all values which are configurable.

Here is a screenshot:

Bildschirmfoto vom 2021-10-30 13-47-35

Please, can you fix the drop down menues, that the directories created via kubernetes will not be listed?

Screenshots

No response

Originally created by @volker-raschek on GitHub (Oct 30, 2021). ### Gitea Version v1.15.3 ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Via kubernetes v1.22.2 ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description Hi, I added a [feature request](https://gitea.com/gitea/helm-chart/pulls/235) for the helm chart of gitea to support the creation of custom gitignores, repository labels, licenses and README files - [official documentation](https://docs.gitea.io/en-us/customizing-gitea/#customizing-gitignores-labels-licenses-locales-and-readmes). The files are added via a config map into the file system. Kubernetes creates additionally a directory named `data` with a timestamp. This directory is listed in the drop down menue of all values which are configurable. Here is a screenshot: ![Bildschirmfoto vom 2021-10-30 13-47-35](https://user-images.githubusercontent.com/18311012/139531892-e1362e3f-1a17-4859-a3cf-4d9d0a18d1db.png) Please, can you fix the drop down menues, that the directories created via kubernetes will not be listed? ### Screenshots _No response_
Author
Owner

@justusbunsi commented on GitHub (Oct 30, 2021):

Interesting that the directories used by Kubernetes doesn't provide labels although the ..data directory contains the actual folder listed as myLabels. Maybe it could be a first approach to filter out empty lists and use the deepest directory level and dedup lists. 🤔

@justusbunsi commented on GitHub (Oct 30, 2021): Interesting that the directories used by Kubernetes doesn't provide labels although the `..data` directory contains the actual folder listed as `myLabels`. Maybe it could be a first approach to filter out empty lists and use the deepest directory level and dedup lists. 🤔
Author
Owner

@wxiaoguang commented on GitHub (Apr 20, 2023):

This issue should have been fixed.

@wxiaoguang commented on GitHub (Apr 20, 2023): This issue should have been fixed.
Author
Owner

@justusbunsi commented on GitHub (Apr 20, 2023):

In current release or dev/next tag?

@justusbunsi commented on GitHub (Apr 20, 2023): In current release or dev/next tag?
Author
Owner

@wxiaoguang commented on GitHub (Apr 20, 2023):

1.19: fatal error: Unable to read file "/Users/developer/work/gitea/custom/options/label/MyDir". Error: read /Users/developer/work/gitea/custom/options/label/MyDir: is a directory

Then user could remove the directory manually

1.20: No fatal error, the directory is not listed (only files are listed), because the new "AssetFS" works better for local assets.

@wxiaoguang commented on GitHub (Apr 20, 2023): 1.19: fatal error: Unable to read file "/Users/developer/work/gitea/custom/options/label/MyDir". Error: read /Users/developer/work/gitea/custom/options/label/MyDir: is a directory Then user could remove the directory manually 1.20: No fatal error, the directory is not listed (only files are listed), because the new "AssetFS" works better for local assets.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8046