From d08705a7227f1cb6f2e6756b510c47a9040f26ed Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Wed, 7 Sep 2022 18:17:37 +0200 Subject: [PATCH] Fetch bitrise commit author and commiter info --- lib/datadog/ci/ext/environment.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/datadog/ci/ext/environment.rb b/lib/datadog/ci/ext/environment.rb index 5110668e48..bc6cc77520 100644 --- a/lib/datadog/ci/ext/environment.rb +++ b/lib/datadog/ci/ext/environment.rb @@ -330,6 +330,10 @@ def extract_bitrise(env) branch = ( env['BITRISEIO_GIT_BRANCH_DEST'] || env['BITRISE_GIT_BRANCH'] ) + commiter_email = ( + env['GIT_CLONE_COMMIT_COMMITER_EMAIL'] || env['GIT_CLONE_COMMIT_COMMITER_NAME'] + ) + { TAG_PROVIDER_NAME => 'bitrise', TAG_PIPELINE_ID => env['BITRISE_BUILD_SLUG'], @@ -341,7 +345,11 @@ def extract_bitrise(env) Core::Git::Ext::TAG_COMMIT_SHA => commit, Core::Git::Ext::TAG_BRANCH => branch, Core::Git::Ext::TAG_TAG => env['BITRISE_GIT_TAG'], - Core::Git::Ext::TAG_COMMIT_MESSAGE => env['BITRISE_GIT_MESSAGE'] + Core::Git::Ext::TAG_COMMIT_MESSAGE => env['BITRISE_GIT_MESSAGE'], + Core::Git::Ext::TAG_COMMIT_AUTHOR_NAME => env['GIT_CLONE_COMMIT_AUTHOR_NAME'], + Core::Git::Ext::TAG_COMMIT_AUTHOR_EMAIL => env['GIT_CLONE_COMMIT_AUTHOR_EMAIL'], + Core::Git::Ext::TAG_COMMIT_COMMITTER_NAME => env['GIT_CLONE_COMMIT_COMMITER_NAME'], + Core::Git::Ext::TAG_COMMIT_COMMITTER_EMAIL => commiter_email } end