summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Alfonsi <laurent.alfonsi@linaro.org>2023-05-17 20:05:09 +0200
committerLaurent Alfonsi <laurent.alfonsi@linaro.org>2023-05-19 14:00:51 +0000
commita3ab26eab9d9ba1bad21bd3de1653ab63b18b34f (patch)
tree47c1e0eced6123413aad825f83e595cd6a04f4e9
parentbc88bce5ff60f5c0c57e2efc8b2a3bfdbe67e9ba (diff)
round-robin-notify.sh: rewrite for readability
Change-Id: I2865fd88ac0598c9d7327f3367e41b6f0b09448b
-rwxr-xr-xround-robin-notify.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/round-robin-notify.sh b/round-robin-notify.sh
index 3d0821eb..9921f34b 100755
--- a/round-robin-notify.sh
+++ b/round-robin-notify.sh
@@ -391,18 +391,20 @@ print_last_icommit_status ()
# Result stored in first_icommit_to_report global variable
check_if_first_report()
{
- declare -g first_icommit_to_report=false
-
- if [ x"$change_kind" = x"single_commit" ]; then
- local isubdir
- isubdir=$(interesting_subdir "$changed_single_component" "$first_bad" \
- "$ci_project")
- first_icommit_to_report=true
- if [ -d "$icommits/$isubdir/$ci_config" ]; then
- first_icommit_to_report=false
- fi
+ declare -g first_icommit_to_report
+
+ if [ x"$change_kind" != x"single_commit" ]; then
+ first_icommit_to_report=false
+ return
fi
+ local isubdir
+ isubdir=$(interesting_subdir "$changed_single_component" "$first_bad" \
+ "$ci_project")
+ first_icommit_to_report=true
+ if [ -d "$icommits/$isubdir/$ci_config" ]; then
+ first_icommit_to_report=false
+ fi
}
print_config()