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 1ec10f6 commit ca459d9Copy full SHA for ca459d9
lib/code_climate/test_reporter/git.rb
@@ -4,7 +4,7 @@ class Git
4
class << self
5
def info
6
{
7
- head: head,
+ head: head_from_ci_or_git,
8
committed_at: committed_at_from_git_or_ci,
9
branch: branch_from_git_or_ci,
10
}
@@ -34,8 +34,8 @@ def clean_git_branch
34
35
private
36
37
- def head
38
- git("log -1 --pretty=format:'%H'")
+ def head_from_ci_or_git
+ Ci.service_data[:commit_sha] || git("log -1 --pretty=format:'%H'")
39
end
40
41
def committed_at_from_ci
0 commit comments