Class: Datadog::CI::Ext::Environment::Providers::LocalGit
- Inherits:
-
Base
- Object
- Base
- Datadog::CI::Ext::Environment::Providers::LocalGit
show all
- Defined in:
- lib/datadog/ci/ext/environment/providers/local_git.rb
Overview
As a fallback we try to fetch git information from the local git repository
Instance Attribute Summary
Attributes inherited from Base
#env
Instance Method Summary
collapse
Methods inherited from Base
#ci_env_vars, #git_branch_or_tag, #git_commit_head_sha, #git_pull_request_base_branch, #git_pull_request_base_branch_head_sha, #git_pull_request_base_branch_sha, handles?, #initialize, #job_id, #job_name, #job_url, #node_labels, #node_name, #pipeline_id, #pipeline_name, #pipeline_number, #pipeline_url, #pr_number, #provider_name, #stage_name
Instance Method Details
#git_commit_author_date ⇒ Object
41
42
43
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 41
def git_commit_author_date
author&.date
end
|
#git_commit_author_email ⇒ Object
37
38
39
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 37
def git_commit_author_email
author&.email
end
|
#git_commit_author_name ⇒ Object
33
34
35
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 33
def git_commit_author_name
author&.name
end
|
#git_commit_committer_date ⇒ Object
53
54
55
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 53
def git_commit_committer_date
committer&.date
end
|
#git_commit_committer_email ⇒ Object
49
50
51
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 49
def git_commit_committer_email
committer&.email
end
|
#git_commit_committer_name ⇒ Object
45
46
47
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 45
def git_commit_committer_name
committer&.name
end
|
#git_commit_head_author_date ⇒ Object
63
64
65
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 63
def git_commit_head_author_date
head_author&.date
end
|
#git_commit_head_author_email ⇒ Object
67
68
69
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 67
def git_commit_head_author_email
head_author&.email
end
|
#git_commit_head_author_name ⇒ Object
71
72
73
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 71
def git_commit_head_author_name
head_author&.name
end
|
#git_commit_head_committer_date ⇒ Object
75
76
77
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 75
def git_commit_head_committer_date
head_committer&.date
end
|
#git_commit_head_committer_email ⇒ Object
79
80
81
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 79
def git_commit_head_committer_email
head_committer&.email
end
|
#git_commit_head_committer_name ⇒ Object
83
84
85
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 83
def git_commit_head_committer_name
head_committer&.name
end
|
#git_commit_head_message ⇒ Object
57
58
59
60
61
|
# File 'lib/datadog/ci/ext/environment/providers/local_git.rb', line 57
def git_commit_head_message
return nil if head_commit_sha_from_env.nil?
CI::Git::LocalRepository.git_commit_message(head_commit_sha_from_env)
end
|
#git_commit_message ⇒ Object
#git_repository_url ⇒ Object