Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushidianapps authored Apr 12, 2024
1 parent 7205088 commit 1380267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
run: |
description=${{ github.event.pull_request.body }}
jira_regex="https?://[a-zA-Z0-9-.]+\.atlassian\.net/browse/[A-Z]+-\d+" # Regular expression for JIRA ticket link
if [[ -z "$description" ]]; then
if [[ -z "${{ github.event.pull_request.body }}" ]]; then
echo "❌ Pull Request description is missing. Please provide a description of your changes."
exit 1
elif [[ ! $description =~ $jira_regex ]]; then
elif [[ ! ${{ github.event.pull_request.body }} =~ $jira_regex ]]; then
echo "❌ Pull Request description must contain a link to the JIRA ticket (e.g., https://yourcompany.atlassian.net/browse/JIRA-123)"
exit 1
fi

0 comments on commit 1380267

Please sign in to comment.