Skip to content

Commit

Permalink
Fix up issues reported in review
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken committed Nov 9, 2023
1 parent 50fb723 commit 2d836f7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions scripts/prepare_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,26 @@ if [ -z $LAST_RELEASE ]; then
fi

if [ -z "$(which jq)" ]; then
DO_PR_CHECK=0
echo "jq command not found"
return 1
fi
if ! (($+commands[gh])); then
DO_PR_CHECK=0

if [ -z "$(which jq)" ]; then
echo "gh command not found"
return 1
fi

get_prs(){
release_time="$(gh release view --json "createdAt" --jq '.createdAt' ${LAST_RELEASE})"
gh pr list -s merged -S "merged:>=$release_time -label:documentation -label:automated -label:tech-debt -label:website -label:legal -label:docs -author:hc-github-team-packer" --json "number" --jq '.[]|.number' | while read line
release_time="$(gh release view --json "createdAt" --jq '.createdAt' ${LAST_RELEASE})"
gh pr list -s merged -S "merged:>=$release_time -label:documentation -label:automated -label:tech-debt -label:website -label:legal -label:docs -author:hc-github-team-packer" --json "number" --jq '.[]|.number' \
| while read line
do
grep -q "GH-${line}" CHANGELOG.md
if grep -q "GH-${line}" CHANGELOG.md then
if grep -q "GH-${line}" CHANGELOG.md; then
echo $line
fi
done | while read PR_NUM
do
out=$(gh pr view ${PR_NUM} --json "title,labels,url" > pull.json)
exy="$?"
if [ "$?" -ne 0 ]; then
echo "bad response from github: manually check PR ${PR_NUM}"
continue
Expand Down

0 comments on commit 2d836f7

Please sign in to comment.