Merge pull request #8121 from ipfs/fix/mkreleaselog-first-commit

fix(mkreleaselog): handle commit 0
This commit is contained in:
Steven Allen 2021-06-24 17:36:41 -07:00 committed by GitHub
commit b4b10f5b98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,8 +120,10 @@ release_log() {
"$start..$end" |
while read commit subject; do
# Skip gx-only PRs.
git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" |
grep -v "${IGNORED_FILES}" >/dev/null || continue
if git rev-parse '$commit^' >/dev/null 2>&1 &&
! git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" | grep -v "${IGNORED_FILES}" >/dev/null; then
continue
fi
if [[ "$subject" =~ '^Merge pull request #([0-9]+) from' ]]; then
local prnum="${BASH_REMATCH[2]}"