We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fb1a2c commit 5496a22Copy full SHA for 5496a22
1 file changed
.github/scripts/verify-fix-versions.sh
@@ -46,8 +46,20 @@ get_commits_since_tag() {
46
47
extract_jira_tickets() {
48
local commits="$1"
49
+ local tickets
50
+ local extract_exit_code=0
51
# Extract SONARPY-XXXX patterns, remove duplicates, and sort
- echo "$commits" | grep -oE "${JIRA_PROJECT_KEY}-[0-9]+" | sort -u
52
+ set +e
53
+ tickets=$(printf '%s\n' "$commits" | grep -oE "${JIRA_PROJECT_KEY}-[0-9]+" | sort -u)
54
+ extract_exit_code=$?
55
+ set -e
56
+
57
+ if [[ "$extract_exit_code" -gt 1 ]]; then
58
+ echo "Error: Failed to extract Jira tickets from commits" >&2
59
+ exit 1
60
+ fi
61
62
+ printf '%s' "$tickets"
63
}
64
65
build_jql_query() {
@@ -293,4 +305,3 @@ main() {
293
305
294
306
main "$@"
295
307
296
-
0 commit comments