Shouldn't just `if echo "$FEATURE_BRANCH" | grep -q "$ISSUE_NUMBER"; then` be sufficient to replace these two lines? If ISSUE_NUMBER is non-empty and FEATURE_BRANCH is empty, then the "grep" will return failure.