Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify project language in GitLab?

Tags:

gitlab

One can manually select project language at Bitbucket or use .gitattributes at GitHub.

Is there a way to make GitLab assign a specific language to a project?

like image 800
homocomputeris Avatar asked Apr 29 '16 12:04

homocomputeris


People also ask

How do I know my GitHub language?

To see your language percentage being used in your repository, simply click anywhere on the color bar… and you'll see the breakdown of languages detected inside. If you want to see how GitHub is calculating these percentages, check out the github/linguist repository!

What is Project slug in GitLab?

The slug is what the GitLab instance will use as the URL path to the project. If you want a different slug, input the project name first, then change the slug after. The path to your project in the Project slug field. This is the URL path for your project that the GitLab instance will use.


1 Answers

GitLab will adhere to the overrides specified in your .gitattributes file. Currently, GitLab uses the Linguist Gem. Without these overrides Linguist will deduce the main language used for a project by analysing the code within files in the project.

You can find out how the magic happens by referring to the Repository#main_language method within the gitlab-ce project.

like image 164
fletcher Avatar answered Oct 22 '22 05:10

fletcher