summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:48 +0000
commit4d0c47058a89d71d3417ad3bd73781882c8998e8 (patch)
tree808679f68ca8a8511d12779cf618785d6978be81 /app/helpers
parentdf2eda3f14dccb703bd7054d4ddde7803cb1fe7e (diff)
downloadgitlab-ce-4d0c47058a89d71d3417ad3bd73781882c8998e8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/projects_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 023790f7d87..5aff12621b5 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -381,6 +381,14 @@ module ProjectsHelper
@project.grafana_integration&.enabled?
end
+ def project_license_name(project)
+ project.repository.license&.name
+ rescue GRPC::Unavailable, GRPC::DeadlineExceeded, Gitlab::Git::CommandError => e
+ Gitlab::ErrorTracking.track_exception(e)
+
+ nil
+ end
+
private
def get_project_nav_tabs(project, current_user)