go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.41k stars 5.43k forks source link

Instance wide .gitattributes languages #31072

Open Tinyblargon opened 4 months ago

Tinyblargon commented 4 months ago

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

silverwind commented 4 months ago

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