From 4321b1f80cf3e9ab6627beb61c07fed651f534d3 Mon Sep 17 00:00:00 2001 From: Martin Lowe <martin.lowe@eclipse-foundation.org> Date: Tue, 21 Jun 2022 13:12:11 -0400 Subject: [PATCH] Iss. #57 - Add check to skip validation if there are no new commits --- src/main/rb/eca.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/rb/eca.rb b/src/main/rb/eca.rb index fb67dff8..3b152318 100644 --- a/src/main/rb/eca.rb +++ b/src/main/rb/eca.rb @@ -100,6 +100,12 @@ else end diff_git_commits = diff_git_commits_raw.split(/\n/) +## Check if the are commits to validate. If there are none we can end processing here +if (diff_git_commits.empty?) then + puts "There are no commits to validate for current push, skipping validation step" + exit 0 +end + processed_git_data = [] diff_git_commits.each do |commit| processed_git_data.push(process_commit(commit)) -- GitLab