summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-11 09:08:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-11 09:08:12 +0000
commit6b8040dc25fdc5fe614c3796a147517dd50bc7d8 (patch)
tree1930c21748fc632a7900659a71fcb7248097879f /app/models
parent7b875aa3fd1645e2e881997256ba94c6cb73ab3d (diff)
downloadgitlab-ce-6b8040dc25fdc5fe614c3796a147517dd50bc7d8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_setting.rb3
-rw-r--r--app/models/merge_request.rb6
2 files changed, 6 insertions, 3 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index 4ba0317b580..e764b6c56b0 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -5,9 +5,6 @@ class ApplicationSetting < ApplicationRecord
include CacheMarkdownField
include TokenAuthenticatable
include ChronicDurationAttribute
- include IgnorableColumns
-
- ignore_columns :pendo_enabled, :pendo_url, remove_after: '2019-12-01', remove_with: '12.6'
add_authentication_token_field :runners_registration_token, encrypted: -> { Feature.enabled?(:application_settings_tokens_optional_encryption, default_enabled: true) ? :optional : :required }
add_authentication_token_field :health_check_access_token
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 240c143abba..bbc54987407 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -1423,6 +1423,12 @@ class MergeRequest < ApplicationRecord
true
end
+ def pipeline_coverage_delta
+ if base_pipeline&.coverage && head_pipeline&.coverage
+ '%.2f' % (head_pipeline.coverage.to_f - base_pipeline.coverage.to_f)
+ end
+ end
+
def base_pipeline
@base_pipeline ||= project.ci_pipelines
.order(id: :desc)