Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
  • Loading branch information
jetersen and jglick committed Jun 3, 2022
1 parent 3de4d09 commit e85a17a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ set -euxo pipefail
if [ $GITHUB_EVENT_NAME = check_run ]
then
if [ -z "$RELEASE_DRAFT_BODY" ]; then
RESULT=$(gh api /repos/$GITHUB_REPOSITORY/releases | jq -e -r '.[] | select(.draft == true and .name == "next") | .body' | egrep "$INTERESTING_CATEGORIES" || echo 'failed')
else
RESULT=$(echo "$RELEASE_DRAFT_BODY" | egrep "$INTERESTING_CATEGORIES" || echo 'failed')
RELEASE_DRAFT_BODY="$(gh api /repos/$GITHUB_REPOSITORY/releases | jq -e -r '.[] | select(.draft == true and .name == "next") | .body')"
fi

RESULT=$(echo "$RELEASE_DRAFT_BODY" | egrep "$INTERESTING_CATEGORIES" || echo 'failed')
if [[ $RESULT != 'failed' ]]; then
echo "::set-output name=interesting::true"
else
Expand Down

0 comments on commit e85a17a

Please sign in to comment.