From 4b90144537006686f672d3908031bae48a95ab15 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Thu, 26 Mar 2020 21:56:43 -0400 Subject: [PATCH] scripts/prepare_changelog: Update git log to only display PR merged commits This change uses git flags to shorten the log messages to titles only, and uses the grep pattern on git to filter only commits that match merged commits, including squashed and merged commits. --- scripts/prepare_changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index efd10e914..c2f59b20c 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -30,7 +30,7 @@ fi get_prs(){ # git log v0.10.2...c3861d167533fb797b0fae0c380806625712e5f7 | - git log HEAD...${LAST_RELEASE} | + git log HEAD...${LAST_RELEASE} --first-parent --oneline --grep="Merge pull request #[0-9]\+" --grep="\(#[0-9]\+\)$" | grep -o "#\([0-9]\+\)" | awk -F\# '{print $2}' | while read line do grep -q "GH-${line}" CHANGELOG.md