Merge pull request #12074 from jamessan/vim-patch-review

vim-patch.sh: Fix creation of commit list for PR review
This commit is contained in:
James McCoy 2020-04-04 06:39:56 -04:00 committed by GitHub
commit 496faf2271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -670,9 +670,11 @@ review_pr() {
echo
echo "Downloading data for pull request #${pr}."
local pr_commit_urls=(
"$(curl -Ssf "https://api.github.com/repos/neovim/neovim/pulls/${pr}/commits" \
| jq -r '.[].html_url')")
local -a pr_commit_urls
while IFS= read -r pr_commit_url; do
pr_commit_urls+=("$pr_commit_url")
done < <(curl -Ssf "https://api.github.com/repos/neovim/neovim/pulls/${pr}/commits" \
| jq -r '.[].html_url')
echo "Found ${#pr_commit_urls[@]} commit(s)."