File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ issue_number="$3"
1414
1515# Define color codes
1616RED=' \033[0;31m'
17+ YELLOW=' \033[0;33m'
1718NC=' \033[0m' # No Color
1819
1920# Fetch the issue ID given the issue number
@@ -68,3 +69,9 @@ formatted_parent_issue=$(echo "$parent_issue" | jq -r '
6869
6970# Print the formatted parent issue details
7071echo " $formatted_parent_issue " | jq .
72+
73+ # Check if parent issue is null and print a warning
74+ number=$( echo " $formatted_parent_issue " | jq -r ' .number' )
75+ if [ " $number " = " null" ]; then
76+ echo -e " ${YELLOW} Warning: No parent issue for $org /$repo #$issue_number .${NC} "
77+ fi
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ issue_number="$3"
1414
1515# Define color codes
1616RED=' \033[0;31m'
17+ YELLOW=' \033[0;33m'
1718NC=' \033[0m' # No Color
1819
1920# Fetch the issue ID given the issue number
@@ -72,3 +73,9 @@ combined_result=$(echo "$sub_issues" | jq -s '
7273
7374# Print the combined result as a colorized JSON object
7475echo " $combined_result " | jq .
76+
77+ # Check if total is 0 and print a warning
78+ total=$( echo " $combined_result " | jq -r ' .totalCount' )
79+ if [ " $total " -eq 0 ]; then
80+ echo -e " ${YELLOW} Warning: The total number of sub-issues for $org /$repo #$issue_number is 0.${NC} "
81+ fi
You can’t perform that action at this time.
0 commit comments