mirror of
https://github.com/ncarlier/webhookd.git
synced 2024-09-20 08:55:28 +00:00
update test sha1 with github signature (#50)
fix(example): update Github hook signature format
This commit is contained in:
parent
6b3623f67a
commit
67107de377
|
@ -12,7 +12,7 @@ debug() {
|
||||||
|
|
||||||
# Validate Github hook
|
# Validate Github hook
|
||||||
signature=$(echo -n "$1" | openssl sha1 -hmac "$GITHUB_SECRET" | sed -e 's/^.* //')
|
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
|
# Validate parameters
|
||||||
payload=$1
|
payload=$1
|
||||||
|
@ -34,4 +34,4 @@ then
|
||||||
issue_url=$(echo $payload | jq .issue.url -r)
|
issue_url=$(echo $payload | jq .issue.url -r)
|
||||||
sender=$(echo $payload | jq .sender.login -r)
|
sender=$(echo $payload | jq .sender.login -r)
|
||||||
echo "notify: New issue from $sender: $issue_url"
|
echo "notify: New issue from $sender: $issue_url"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user