Skip to content

Commit

Permalink
simplify if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen committed Jun 13, 2022
1 parent 6072252 commit e19d1ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run.sh
Expand Up @@ -2,12 +2,13 @@
set -euxo pipefail
if [ $GITHUB_EVENT_NAME = check_run ]
then
if [ -z "$RELEASE_DRAFT_BODY" ]; then
if [ -z "$RELEASE_DRAFT_BODY" ]
then
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
if echo "$RELEASE_DRAFT_BODY" | egrep "$INTERESTING_CATEGORIES"
then
echo "::set-output name=interesting::true"
else
echo "::set-output name=interesting::false"
Expand Down

0 comments on commit e19d1ee

Please sign in to comment.