Skip to content
Snippets Groups Projects

Expose refspec and depth to runner

Merged Shinya Maeda requested to merge expose-merge-ref-to-runner into master
All threads resolved!
Compare and Show latest version
3 files
+ 36
26
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 10
11
@@ -11,7 +11,6 @@ class Pipeline < ActiveRecord::Base
include Gitlab::Utils::StrongMemoize
include AtomicInternalId
include EnumWithNil
include HasRef
belongs_to :project, inverse_of: :all_pipelines
belongs_to :user
@@ -708,6 +707,16 @@ def default_branch?
ref == project.default_branch
end
##
# This path is for preventing ambiguous match from protected branchs/tags matches
def ref_path
if tag?
Gitlab::Git::TAG_REF_PREFIX + ref.to_s
else
Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
end
end
private
def ci_yaml_from_repo
@@ -738,16 +747,6 @@ def push_details
end
end
##
# This path is for preventing ambiguous match from protected branchs/tags
def ref_path
if tag?
Gitlab::Git::TAG_REF_PREFIX + ref.to_s
else
Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
end
end
def latest_builds_status
return 'failed' unless yaml_errors.blank?
Loading