Skip to content

Commit

Permalink
change the if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Shimiazoulai authored Dec 3, 2024
1 parent fb29f2b commit 884abcf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pr-jira-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ jobs:
JIRA_API_URL="https://spotinst.atlassian.net/rest/api/2/issue/$JIRA_TICKET"
JIRA_STATUS=$(curl -s -u $JIRA_USER:$JIRA_API_TOKEN $JIRA_API_URL | jq -r '.fields.status.name')
echo "JIRA_STATUS - $JIRA_STATUS"
if [ "$JIRA_STATUS" != "Approved for Publishing" ] && [[ "$JIRA_TICKET" != *DOC* ]]; then
echo "Jira ticket $JIRA_TICKET is not in 'Approved for Publishing' status and does not contain 'DOC'."
exit 1
if [ "$JIRA_STATUS" != "Approved for Publishing" ]; then
if [[ "$JIRA_TICKET" == *DOC* ]]; then
echo "Jira ticket $JIRA_TICKET is not in 'Approved for Publishing' status and it is from 'DOC' project."
exit 1
fi
fi
echo "All validations passed."

0 comments on commit 884abcf

Please sign in to comment.