diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-03 12:08:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-03 12:08:20 +0300 |
commit | a1aeaba23e388ac96d34c135c6c55e414f823487 (patch) | |
tree | 12ac28cdba58353efe18053028d6028a965c6358 /lib/gitlab | |
parent | d72fedf168dafcb38bd51b67f86804738000fb48 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ci/features.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/diff/highlight.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/search_results.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/sherlock/query.rb | 2 |
4 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/ci/features.rb b/lib/gitlab/ci/features.rb index 957eee8587d..206ba029750 100644 --- a/lib/gitlab/ci/features.rb +++ b/lib/gitlab/ci/features.rb @@ -79,10 +79,6 @@ module Gitlab def self.coverage_report_view?(project) ::Feature.enabled?(:coverage_report_view, project) end - - def self.expose_mr_description_predefined_variable? - ::Feature.enabled?(:ci_expose_mr_description_predefined_variable, default_enabled: true) - end end end end diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb index 0d027809ba8..a5259079345 100644 --- a/lib/gitlab/diff/highlight.rb +++ b/lib/gitlab/diff/highlight.rb @@ -60,7 +60,7 @@ module Gitlab # Only update text if line is found. This will prevent # issues with submodules given the line only exists in diff content. if rich_line - line_prefix = diff_line.text =~ /\A(.)/ ? $1 : ' ' + line_prefix = diff_line.text =~ /\A(.)/ ? Regexp.last_match(1) : ' ' "#{line_prefix}#{rich_line}".html_safe end end diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb index 7198443f72e..33f28efe284 100644 --- a/lib/gitlab/search_results.rb +++ b/lib/gitlab/search_results.rb @@ -186,7 +186,7 @@ module Gitlab params[:sort] = 'updated_desc' if query =~ /#(\d+)\z/ - params[:iids] = $1 + params[:iids] = Regexp.last_match(1) else params[:search] = query end diff --git a/lib/gitlab/sherlock/query.rb b/lib/gitlab/sherlock/query.rb index cbd89b7629f..6f1d2ad23c1 100644 --- a/lib/gitlab/sherlock/query.rb +++ b/lib/gitlab/sherlock/query.rb @@ -105,7 +105,7 @@ module Gitlab query.each_line .map { |line| line.strip } .join("\n") - .gsub(PREFIX_NEWLINE) { "\n#{$1} " } + .gsub(PREFIX_NEWLINE) { "\n#{Regexp.last_match(1)} " } end end end |