This is an automated email from the ASF dual-hosted git repository.

mmarshall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-test-infra.git


The following commit(s) were added to refs/heads/master by this push:
     new 03f84d3  [pulsarbot] trim whitespaces in comments (#54)
03f84d3 is described below

commit 03f84d33346ee7162ffd56dba5904ed130dfc5e4
Author: tison <[email protected]>
AuthorDate: Sat Jul 9 14:18:23 2022 +0800

    [pulsarbot] trim whitespaces in comments (#54)
    
    Signed-off-by: tison <[email protected]>
    
    Contributors' comments often contains whitespaces and such whitespaces 
should not affect command validation.
    
    See also 
https://github.com/apache/pulsar/runs/7245841750?check_suite_focus=true for a 
bad case.
    
    cc @lhotari
---
 pulsarbot/entrypoint.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsarbot/entrypoint.sh b/pulsarbot/entrypoint.sh
index 5186fc4..e733047 100755
--- a/pulsarbot/entrypoint.sh
+++ b/pulsarbot/entrypoint.sh
@@ -6,6 +6,7 @@ fi
 set -e
 
 COMMENT_BODY=$(jq -r '.comment.body' "${GITHUB_EVENT_PATH}")
+COMMENT_BODY=$(echo "$COMMENT_BODY" | xargs)
 
 BOT_COMMAND_PREFIX="/pulsarbot"
 BOT_TARGET_REPOSITORY=${GITHUB_REPOSITORY:-"apache/pulsar"}

Reply via email to