[pw-ci] [PATCH] post_pw: Allow for whitespace on input
Aaron Conole
aconole at redhat.com
Thu Mar 3 19:36:54 UTC 2022
The input parsing side is a bit too rigid, which prevents adding reports
from all different robots. Allow the variables to have extra whitespace
and trim it out when it arrives.
Signed-off-by: Aaron Conole <aconole at redhat.com>
---
post_pw.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/post_pw.sh b/post_pw.sh
index 2998644..e98e8ab 100755
--- a/post_pw.sh
+++ b/post_pw.sh
@@ -60,7 +60,7 @@ send_post() {
fi
context="$(echo "$report" | sed -n 's/.*Test-Label: //p' | tr ' ' '_' | tr ':' '-')"
- state="$(echo "$report" | sed -n 's/.*Test-Status: //p')"
+ state="$(echo "$report" | sed -n 's/.*Test-Status: //p' | xargs)"
description="$(echo "$report" | sed -ne 's/^_\(.*\)_$/\1/p')"
patch_id="$(echo "$report" | sed -ne 's at .*href.*/patch[es]*/\(.*\)/\?".*@\1 at ip' | sed 's@/@@')"
target_url="$link"
--
2.31.1
More information about the Pwci
mailing list