Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sentry/client/projects.rb')
-rw-r--r--lib/sentry/client/projects.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/sentry/client/projects.rb b/lib/sentry/client/projects.rb
deleted file mode 100644
index e686d4ff715..00000000000
--- a/lib/sentry/client/projects.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-module Sentry
- class Client
- module Projects
- def projects
- projects = get_projects
-
- handle_mapping_exceptions do
- map_to_projects(projects)
- end
- end
-
- private
-
- def get_projects
- http_get(api_urls.projects_url)[:body]
- end
-
- def map_to_projects(projects)
- projects.map(&method(:map_to_project))
- end
-
- def map_to_project(project)
- organization = project.fetch('organization')
-
- Gitlab::ErrorTracking::Project.new(
- id: project.fetch('id', nil),
- name: project.fetch('name'),
- slug: project.fetch('slug'),
- status: project.dig('status'),
- organization_name: organization.fetch('name'),
- organization_id: organization.fetch('id', nil),
- organization_slug: organization.fetch('slug')
- )
- end
- end
- end
-end