gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Instance wide .gitattributes languages

Open Tinyblargon opened this issue 1 year ago • 1 comments

Feature Description

Specify custom languages, instance wide in Gitea.

Currently we create .gitattributes files in all our repositories to keep track of unsupported languages. As you can imaging this does not scale well and only gets more cumbersome with each new repository and added language.

Could it be made so you can add custom languages for a whole Gitea instance like we can on a per repository bases already using a .gitattributes file

#Ansible
main.yml linguist-language=Ansible
*.ansible.yml linguist-language=Ansible

#Docker
dockerfile linguist-language=Docker
.dockerignore linguist-language=Docker
docker-compose*.yml linguist-language=Docker
docker-compose*.yaml linguist-language=Docker

#NGINX
*.nginx.conf linguist-language=NGINX

Screenshots

image

Tinyblargon avatar May 24 '24 14:05 Tinyblargon

GitHub supports something similar with a .github repo per-org or user. I think we could support such special repos too:

  • user/.gitea for user-specific settings/files.
  • org/.gitea for org-specific settings/files.
  • .gitea/.gitea for instance-wide settings/files. This special org would need to be restricted to admin users, so no regular user can create it.

silverwind avatar May 27 '24 15:05 silverwind