Commit 23f1cafb authored by Rémy Coutable's avatar Rémy Coutable

Fix static analysis offenses

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e140833b
...@@ -139,11 +139,11 @@ module TreeHelper ...@@ -139,11 +139,11 @@ module TreeHelper
end end
end end
else else
_lock_link(current_user: current_user, project: project, html_options: {}) _lock_link(current_user, project, html_options: html_options)
end end
end end
def _lock_link(current_user: current_user, project: project, html_options: {}) def _lock_link(user, project, html_options: {})
if can?(current_user, :push_code, project) if can?(current_user, :push_code, project)
html_options[:data] = { state: :lock } html_options[:data] = { state: :lock }
enabled_lock_link("Lock", '', html_options) enabled_lock_link("Lock", '', html_options)
......
...@@ -50,6 +50,12 @@ module Ci ...@@ -50,6 +50,12 @@ module Ci
return error('No builds for this pipeline.') return error('No builds for this pipeline.')
end end
_create_pipeline
end
private
def _create_pipeline
Ci::Pipeline.transaction do Ci::Pipeline.transaction do
update_merge_requests_head_pipeline if pipeline.save update_merge_requests_head_pipeline if pipeline.save
...@@ -63,8 +69,6 @@ module Ci ...@@ -63,8 +69,6 @@ module Ci
pipeline.tap(&:process!) pipeline.tap(&:process!)
end end
private
def skip_ci? def skip_ci?
return false unless pipeline.git_commit_message return false unless pipeline.git_commit_message
pipeline.git_commit_message =~ /\[(ci[ _-]skip|skip[ _-]ci)\]/i pipeline.git_commit_message =~ /\[(ci[ _-]skip|skip[ _-]ci)\]/i
......
...@@ -40,7 +40,7 @@ module Gitlab ...@@ -40,7 +40,7 @@ module Gitlab
Gitlab::EtagCaching::Router::Route.new( Gitlab::EtagCaching::Router::Route.new(
%r(^(?!.*(#{RESERVED_WORDS})).*/pipelines/\d+\.json\z), %r(^(?!.*(#{RESERVED_WORDS})).*/pipelines/\d+\.json\z),
'project_pipeline' 'project_pipeline'
), )
].freeze ].freeze
def self.match(env) def self.match(env)
......
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
left_commit_id: parent_id, left_commit_id: parent_id,
right_commit_id: commit.id, right_commit_id: commit.id,
ignore_whitespace_change: options.fetch(:ignore_whitespace_change, false), ignore_whitespace_change: options.fetch(:ignore_whitespace_change, false),
paths: options.fetch(:paths, []), paths: options.fetch(:paths, [])
) )
Gitlab::Git::DiffCollection.new(stub.commit_diff(request), options) Gitlab::Git::DiffCollection.new(stub.commit_diff(request), options)
......
...@@ -8,7 +8,7 @@ params = { ...@@ -8,7 +8,7 @@ params = {
"ref" => ENV["OMNIBUS_BRANCH"] || "master", "ref" => ENV["OMNIBUS_BRANCH"] || "master",
"token" => ENV["BUILD_TRIGGER_TOKEN"], "token" => ENV["BUILD_TRIGGER_TOKEN"],
"variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"], "variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"],
"variables[ALTERNATIVE_SOURCES]" => true, "variables[ALTERNATIVE_SOURCES]" => true
} }
Dir.glob("*_VERSION").each do |version_file| Dir.glob("*_VERSION").each do |version_file|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment