Fix detection of non-numeric branch names in waterfall logic


Non-numeric branches cannot follow a logical order for cherry-
picking. This patch fixes a bug where a crash would occur
if the source branch was non-numeric, but the target branch
was numeric/dev/master. The waterfall logic will now correctly
return a flat list of targets when either source or target branches
are non-compliant.

Fixes: QTQAINFRA-6241
Change-Id: If228ed0a49e566873b9c2677ca3c675b698fc669
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
commita94d03178af9d1efd38343e368e548660d63a586
parent1305349e71b772f48d683d78844695b4db608ed2
authorDaniel Smith <daniel.smith@qt.io>
committerDaniel Smith <daniel.smith@qt.io>
commit timeWed, 24 Apr 2024 13:37:31 +0200