From 7e794f691daf618d862f5107a7719cd5e83170ac Mon Sep 17 00:00:00 2001 From: Alexandre DEVELY <12896316+alexandredevely@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:17:37 +0200 Subject: [PATCH] update test sha1 with github signature fix the error x_hub_signature format: bad hook signature: expecting sha1=b5522ca84a491c0e7e457829356b6d89a836622b and got b5522ca84a491c0e7e457829356b6d89a836622b error: exit status 1 --- scripts/examples/github.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/examples/github.sh b/scripts/examples/github.sh index 2883395..cb2c590 100755 --- a/scripts/examples/github.sh +++ b/scripts/examples/github.sh @@ -12,7 +12,7 @@ debug() { # Validate Github hook signature=$(echo -n "$1" | openssl sha1 -hmac "$GITHUB_SECRET" | sed -e 's/^.* //') -[ "$signature" != "$x_hub_signature" ] && die "bad hook signature: expecting $x_hub_signature and got $signature" +[ "sha1=$signature" != "$x_hub_signature" ] && die "bad hook signature: expecting $x_hub_signature and got $signature" # Validate parameters payload=$1 @@ -34,4 +34,4 @@ then issue_url=$(echo $payload | jq .issue.url -r) sender=$(echo $payload | jq .sender.login -r) echo "notify: New issue from $sender: $issue_url" -fi \ No newline at end of file +fi