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.
This commit is contained in:
Wilken Rivera 2020-03-26 21:56:43 -04:00
parent e3309f3e91
commit 4b90144537
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ fi
get_prs(){ get_prs(){
# git log v0.10.2...c3861d167533fb797b0fae0c380806625712e5f7 | # 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 grep -o "#\([0-9]\+\)" | awk -F\# '{print $2}' | while read line
do do
grep -q "GH-${line}" CHANGELOG.md grep -q "GH-${line}" CHANGELOG.md