gitlab-org--gitlab-foss/app/models
Zeger-Jan van de Weg 79a5d76801
Add repository languages for projects
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.
2018-08-01 18:58:29 +02:00
..
application_setting Messaging on terms page when user already accepted 2018-06-04 22:22:11 +02:00
badges
blob_viewer
ci Fix spec failures 2018-08-01 12:25:19 +02:00
clusters Revert "Merge branch '48098-mutual-auth-cluster-applications' into 'master'" 2018-07-31 13:15:18 +00:00
concerns Resolve "Allow issue's Internal ID (iid) to be set when creating via the API" 2018-08-01 09:03:14 +00:00
conversational_development_index
diff_viewer
hooks Fixed pagination of web hook logs 2018-07-03 14:24:17 +02:00
issue
members Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request
network Resolve Naming/UncommunicativeMethod 2018-07-09 21:13:08 +08:00
project_services Fix couple of moments in HangoutsChatService and its spec 2018-07-14 20:45:53 +09:00
protected_branch
protected_tag
storage Gitlab::Shell works on shard name, not path 2018-04-25 13:36:22 +02:00
.gitkeep
ability.rb Backport of 4084-epics-username-autocomplete 2018-05-04 11:33:09 -06:00
abuse_report.rb
active_session.rb Display and revoke active sessions 2018-05-02 08:08:16 +00:00
appearance.rb allow uploading favicon in appearance settings 2018-06-05 16:20:18 +02:00
application_setting.rb Merge branch '41416-making-instance-wide-data-tools-more-accessible' into 'master' 2018-08-01 15:17:47 +00:00
audit_event.rb
award_emoji.rb
badge.rb Add validation to webhook and service URLs to ensure they are not blocked because of SSRF 2018-06-01 11:43:53 +00:00
blob.rb
board.rb Unify app/views/shared/issuable/_search_bar.html.haml 2018-07-05 17:27:30 +08:00
broadcast_message.rb
chat_name.rb
chat_team.rb
commit.rb Preload pipeline data for project pipelines 2018-05-17 13:53:00 +02:00
commit_collection.rb
commit_range.rb
commit_status.rb Fix spec failures 2018-08-01 12:25:19 +02:00
compare.rb
container_repository.rb
cycle_analytics.rb
dashboard_milestone.rb
deploy_key.rb Revert the addition of goldiloader 2018-04-18 15:51:39 +02:00
deploy_keys_project.rb
deploy_token.rb Rename the module and add a simple test to check 2018-07-27 17:52:45 +08:00
deployment.rb Remove unused stop_action? method from deployment class 2018-07-12 12:31:33 +02:00
diff_discussion.rb
diff_note.rb Persist truncated note diffs on a new table 2018-05-24 15:34:43 -03:00
directly_addressed_user.rb
discussion.rb Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00
discussion_note.rb
email.rb fixes #47716 where email confirmation fails after adding additional emails 2018-07-25 16:15:04 +00:00
environment.rb Rename environments stop action method 2018-07-12 12:22:11 +02:00
epic.rb
event.rb Throttle updates to Project#last_repository_updated_at. 2018-05-29 12:51:32 +02:00
event_collection.rb
external_issue.rb
fork_network.rb Revert the addition of goldiloader 2018-04-18 15:51:39 +02:00
fork_network_member.rb
forked_project_link.rb
generic_commit_status.rb Add validation to webhook and service URLs to ensure they are not blocked because of SSRF 2018-06-01 11:43:53 +00:00
global_label.rb
global_milestone.rb
gpg_key.rb
gpg_key_subkey.rb
gpg_signature.rb
group.rb Revert "Merge branch 'ee-5481-epic-todos' into 'master'" 2018-07-11 18:33:24 +02:00
group_custom_attribute.rb
group_label.rb
group_milestone.rb
guest.rb
identity.rb Backport Identity.uniqueness_scope from EE 2018-05-02 14:36:47 +01:00
import_export_upload.rb Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
individual_note_discussion.rb
instance_configuration.rb
internal_id.rb Resolve "Allow issue's Internal ID (iid) to be set when creating via the API" 2018-08-01 09:03:14 +00:00
issue.rb Resource event model 2018-08-01 08:58:49 +00:00
issue_assignee.rb
issue_collection.rb
key.rb
label.rb Add ability to filter labels by title or description 2018-07-31 12:46:36 +03:00
label_link.rb
label_priority.rb
legacy_diff_discussion.rb
legacy_diff_note.rb
lfs_file_lock.rb
lfs_object.rb Fix file_store for artifacts and lfs when saving 2018-05-01 22:27:54 +02:00
lfs_objects_project.rb
list.rb Backport of "Add assignee lists to boards" 2018-06-07 20:54:24 +00:00
member.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request.rb Resource event model 2018-08-01 08:58:49 +00:00
merge_request_diff.rb Render MR page when no persisted diff_refs or diffs size 2018-07-18 10:53:19 +01:00
merge_request_diff_commit.rb
merge_request_diff_file.rb Persist truncated note diffs on a new table 2018-05-24 15:34:43 -03:00
merge_requests_closing_issues.rb
milestone.rb Fix ordering by name on milestones page 2018-07-30 11:01:55 -03:00
namespace.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
note.rb Show the status of a user in interactions 2018-07-30 15:01:26 +02:00
note_diff_file.rb Persist truncated note diffs on a new table 2018-05-24 15:34:43 -03:00
notification_reason.rb
notification_recipient.rb Merge branch 'issue_44230' into 'master' 2018-06-07 20:10:45 +00:00
notification_setting.rb Allow to toggle notifications for issues due soon 2018-07-12 12:03:29 -03:00
oauth_access_grant.rb
oauth_access_token.rb
out_of_context_discussion.rb
pages_domain.rb Upgrade to Ruby 2.4.4 2018-05-29 15:19:33 -07:00
personal_access_token.rb
personal_snippet.rb Fix an N+1 in avatar URLs 2018-06-05 14:57:19 +01:00
programming_language.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
project.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
project_authorization.rb
project_auto_devops.rb Enforce setting string as value of the CI/CD variable 2018-06-25 14:48:34 +02:00
project_ci_cd_setting.rb Fix Project#group_runners_enabled as it was doing nothing 2018-05-03 14:37:19 +02:00
project_custom_attribute.rb
project_deploy_token.rb
project_feature.rb Added SiteStatistics as counter cache for Projects and Wikis 2018-07-24 18:44:07 +02:00
project_group_link.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
project_import_data.rb Upgrade to Ruby 2.4.4 2018-05-29 15:19:33 -07:00
project_import_state.rb Backports every CE related change from ee-44542 to CE 2018-05-04 17:33:26 +02:00
project_label.rb
project_snippet.rb
project_statistics.rb Update total storage size when changing size of artifacts 2018-07-27 17:21:41 +02:00
project_team.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
project_wiki.rb Use limit parameter to retrieve Wikis from Gitaly 2018-07-24 15:36:31 -07:00
protectable_dropdown.rb
protected_branch.rb Rename master to maintainer 2018-06-06 20:57:14 +09:00
protected_ref_matcher.rb
protected_tag.rb
push_event.rb
push_event_payload.rb
readme_blob.rb
redirect_route.rb
release.rb
remote_mirror.rb Merge branch 'security-event-counters-private-data' into 'master' 2018-07-24 20:25:25 +00:00
repository.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
repository_language.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
resource_label_event.rb Resource event model 2018-08-01 08:58:49 +00:00
route.rb
security_event.rb
sent_notification.rb Backport 5480-epic-notifications from EE 2018-05-07 12:58:47 -06:00
service.rb Add dummy Google Hangouts Chat integration 2018-07-14 20:45:04 +09:00
site_statistic.rb Document site statistics API 2018-07-24 18:44:08 +02:00
snippet.rb Show the status of a user in interactions 2018-07-30 15:01:26 +02:00
snippet_blob.rb
spam_log.rb
subscription.rb
system_note_metadata.rb Backport of 1481-changing-weight-values-should-trigger-system-notes 2018-05-03 11:18:51 -07:00
term_agreement.rb Messaging on terms page when user already accepted 2018-06-04 22:22:11 +02:00
timelog.rb Rails5 fix expected issuable.reload.updated_at to have changed 2018-06-13 07:52:35 +02:00
todo.rb Revert "Merge branch 'ee-5481-epic-todos' into 'master'" 2018-07-11 18:33:24 +02:00
tree.rb
trending_project.rb
u2f_registration.rb
upload.rb
user.rb Merge branch 'bvl-user-status-message-35463' into 'master' 2018-08-01 15:21:24 +00:00
user_agent_detail.rb
user_callout.rb Resolve "Inform users of up to $500 offer for GCP account" 2018-05-07 18:06:02 +00:00
user_custom_attribute.rb
user_interacted_project.rb
user_status.rb Show the status of a user in interactions 2018-07-30 15:01:26 +02:00
user_synced_attributes_metadata.rb
users_star_project.rb
wiki_directory.rb
wiki_page.rb Merge branch 'satishperala/gitlab-ce-20720_webhooks_full_image_url' into 'master' 2018-07-17 15:57:10 +00:00