Search This Blog

Thursday 27 April 2017

Problem with github not labelling the repo language correctly

GitHub uses the Linguist library to classify a repo. It does so by comparing percentages of the various language files (goes by extensions perhaps among other things). So if the repo contains more HTML files than Go files, which was my case, then is is classified as an HTML repo. Not good.

Solution


Add a new file to the repo called .gitattributes with following content:

*.html linguist-language=Go


Alternatively, for a nodejs repo:

*.html linguist-language=JavaScript


No comments:

Post a Comment

Note: only a member of this blog may post a comment.