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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 09:06:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 09:06:16 +0300
commitfbcb36880cda3a29cfa4ebed4d080701c302256b (patch)
tree7ef2430b3234f3ee30c45f7f9d05bf0e83aa5d19 /lib/gitlab/background_migration
parent7bb7a8d529fd1155a35a2e9e9cdddd7953f3776d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/update_vulnerability_confidence.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/gitlab/background_migration/update_vulnerability_confidence.rb b/lib/gitlab/background_migration/update_vulnerability_confidence.rb
deleted file mode 100644
index f02f8151778..00000000000
--- a/lib/gitlab/background_migration/update_vulnerability_confidence.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-# rubocop:disable Style/Documentation
-module Gitlab
- module BackgroundMigration
- class UpdateVulnerabilityConfidence
- class Occurrence < ActiveRecord::Base
- include ::EachBatch
-
- self.table_name = 'vulnerability_occurrences'
-
- REPORT_TYPES = {
- container_scanning: 2
- }.freeze
-
- CONFIDENCE_LEVELS = {
- unknown: 2,
- medium: 5
- }.freeze
-
- enum confidences: CONFIDENCE_LEVELS
- enum report_type: REPORT_TYPES
-
- def self.container_scanning_reports_with_medium_confidence
- where(report_type: self.report_types[:container_scanning], confidence: self.confidences[:medium])
- end
- end
-
- def perform(start_id, stop_id)
- Occurrence.container_scanning_reports_with_medium_confidence
- .where(id: start_id..stop_id)
- .update_all(confidence: Occurrence.confidences[:unknown])
- end
- end
- end
-end