From a6d56bfb148820133f5304c2c24f596c94c010d7 Mon Sep 17 00:00:00 2001 From: Juan Fernandez Date: Tue, 5 Oct 2021 15:58:36 +0200 Subject: [PATCH] simplify branch_or_tag logic --- lib/datadog/ci/ext/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datadog/ci/ext/environment.rb b/lib/datadog/ci/ext/environment.rb index f8f4bf7c0f..6434aab2fd 100644 --- a/lib/datadog/ci/ext/environment.rb +++ b/lib/datadog/ci/ext/environment.rb @@ -454,7 +454,7 @@ def extract_local_git def branch_or_tag(branch_or_tag) branch = tag = nil - if !branch_or_tag.nil? && branch_or_tag.include?('tags/') + if branch_or_tag && branch_or_tag.include?('tags/') tag = branch_or_tag else branch = branch_or_tag