We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da1781a commit dbe0838Copy full SHA for dbe0838
app/jobs/github_checkout_job.rb
@@ -22,7 +22,7 @@ def commit=(value)
22
def perform(owner:, project:, commit: nil)
23
self.owner = owner
24
self.project = project
25
- self.commit = commit || primary_branch
+ self.commit = commit.present? ? commit : primary_branch
26
27
raise DisallowedCheckoutError.new(owner:, project:) if library_version.disallowed?
28
@@ -64,7 +64,7 @@ def run_checkout_clone
64
clone_cmd = "git clone --depth 1 --single-branch #{branch_opt}#{url.inspect} #{temp_clone_path.to_s.inspect}"
65
sh(clone_cmd, title: "Cloning project #{name}")
66
67
- if commit.nil?
+ if commit.blank?
68
self.commit = `git -C #{temp_clone_path.to_s.inspect} rev-parse --abbrev-ref HEAD`.strip
69
end
70
0 commit comments