File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,11 @@ jobs:
4141 # Handle the API response
4242 if [ "$http_code" -eq 201 ]; then
4343 echo "Comment posted successfully to Jira issue ${{ inputs.jira_id }}"
44- echo "Response Body: $response_body"
4544 else
4645 echo "Failed to post comment to Jira issue ${{ inputs.jira_id }}. HTTP Code: $http_code"
47- echo "Response Body: $response_body"
4846
4947 echo '### ⚠️ Failed to post comment to Jira' >> $GITHUB_STEP_SUMMARY
5048 echo "#### Issue ID: ${{ inputs.jira_id }}" >> $GITHUB_STEP_SUMMARY
5149 echo "#### HTTP Code: $http_code" >> $GITHUB_STEP_SUMMARY
5250 echo "#### Response Body: $response_body" >> $GITHUB_STEP_SUMMARY
53-
5451 fi
Original file line number Diff line number Diff line change 3333 commit_message=$(echo "$commit_info" | jq -r '.commit.message')
3434
3535 # Extract JIRA ID
36- JIRA_ID=$(echo "$commit_message" | grep -oE 'SCFA-[0-9]{1,5}' || true) # Prevents non-zero exit code
37-
36+ JIRA_ID=$(echo "$commit_message" | grep -oE 'SCFA-[0-9]{1,5}' | head -n 1 || true)
37+
3838 # Check if JIRA ID is found
3939 if [ -z "$JIRA_ID" ]; then
4040 echo "No JIRA ID found in commit message : $commit_message"
You can’t perform that action at this time.
0 commit comments