From 6aba0e4c390f69e34c4a0fb1f4d8708b3956b93a Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 5 Dec 2023 21:51:41 +0100 Subject: [PATCH] Correct git log in issue verification Only the first line counts. This avoids flaggin where a commit contains 'something fixes #1234' somewhere in the description. A common way this is included is the `Fixes: commitsha ("commit description")`. --- issues | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/issues b/issues index a6ea2fe..0f1a6af 100755 --- a/issues +++ b/issues @@ -17,7 +17,7 @@ end current_release_name = ARGV[1] prev_release_name = ARGV[2] -git_issues = Set.new(`git log #{prev_release_name}.. | grep -i fixes | egrep -o \"[ ,]#[0-9]*\" | sed -e 's/[ ,]#//g'`.split.map(&:to_i)) +git_issues = Set.new(`git log --oneline #{prev_release_name}.. | grep -i fixes | grep -E -o \"[ ,]#[0-9]*\" | sed -e 's/[ ,]#//g'`.split.map(&:to_i)) def url_to_json(uri) response = Net::HTTP.get(uri)