summaryrefslogtreecommitdiff
path: root/app/models/repository_language.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42GitLab Bot2022-04-201-2/+2
|
* Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42GitLab Bot2021-07-201-0/+4
|
* Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42GitLab Bot2021-02-181-0/+2
|
* Add latest changes from gitlab-org/gitlab@13-1-stable-eeGitLab Bot2020-06-181-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-101-1/+1
|
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Enable frozen string in rest of app/models/**/*.rbgfyoung2018-08-101-0/+2
| | | | Partially addresses #47424.
* Add repository languages for projectsZeger-Jan van de Weg2018-08-011-0/+12
Our friends at GitHub show the programming languages for a long time, and inspired by that this commit means to create about the same functionality. Language detection is done through Linguist, as before, where the difference is that we cache the result in the database. Also, Gitaly can incrementaly scan a repository. This is done through a shell out, which creates overhead of about 3s each run. For now this won't be improved. Scans are triggered by pushed to the default branch, usually `master`. However, one exception to this rule the charts page. If we're requesting this expensive data anyway, we just cache it in the database. Edge cases where there is no repository, or its empty are caught in the Repository model. This makes use of Redis caching, which is probably already loaded. The added model is called RepositoryLanguage, which will make it harder if/when GitLab supports multiple repositories per project. However, for now I think this shouldn't be a concern. Also, Language could be confused with the i18n languages and felt like the current name was suiteable too. Design of the Project#Show page is done with help from @dimitrieh. This change is not visible to the end user unless detections are done.