diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 12:09:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 12:09:27 +0300 |
commit | 2af90cef2e2e9c776eae4394a43dba3be7f33d1e (patch) | |
tree | bb4bc691caa6cc74b45720ecd779517f9c8c2cd3 /lib | |
parent | cf58004721ee715dd3884476f6fa0c62a7e7f247 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities/snippet.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/metrics/dashboard/stages/project_metrics_inserter.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/entities/snippet.rb b/lib/api/entities/snippet.rb index d92f7b79c28..8a13b4746a9 100644 --- a/lib/api/entities/snippet.rb +++ b/lib/api/entities/snippet.rb @@ -10,6 +10,7 @@ module API expose :web_url do |snippet| Gitlab::UrlBuilder.build(snippet) end + expose :ssh_url_to_repo, :http_url_to_repo, if: ->(snippet) { snippet.versioned_enabled_for?(options[:current_user]) } end end end diff --git a/lib/gitlab/metrics/dashboard/stages/project_metrics_inserter.rb b/lib/gitlab/metrics/dashboard/stages/project_metrics_inserter.rb index c0f67d445f8..26345c265ef 100644 --- a/lib/gitlab/metrics/dashboard/stages/project_metrics_inserter.rb +++ b/lib/gitlab/metrics/dashboard/stages/project_metrics_inserter.rb @@ -75,6 +75,7 @@ module Gitlab def find_metric(metrics, metric) return unless metrics + return unless metric.identifier metrics.find { |m| m[:id] == metric.identifier } end |