Skip to content

Commit

Permalink
#8 Support GitHub secret signing
Browse files Browse the repository at this point in the history
  • Loading branch information
simbo1905 committed Jan 2, 2019
1 parent 83a3947 commit 0785e46
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 16 deletions.
34 changes: 26 additions & 8 deletions hooks-push.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,34 @@
"and":
[
{
"match":
{
"type": "value",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
"or":
[
{
"source": "payload",
"name": "secret"
"match":
{
"type": "value",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
{
"source": "payload",
"name": "secret"
}
}
}
}
,
{
"match":
{
"type": "payload-hash-sha1",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
{
"source": "header",
"name": "X-Hub-Signature"
}
}
}
]
},
{
"match":
Expand Down
34 changes: 26 additions & 8 deletions hooks-release.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,34 @@
"and":
[
{
"match":
{
"type": "value",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
"or":
[
{
"source": "payload",
"name": "secret"
"match":
{
"type": "value",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
{
"source": "payload",
"name": "secret"
}
}
}
}
,
{
"match":
{
"type": "payload-hash-sha1",
"value": "{{ getenv "WEBHOOK_SECRET" | js }}",
"parameter":
{
"source": "header",
"name": "X-Hub-Signature"
}
}
}
]
},
{
"match":
Expand Down

0 comments on commit 0785e46

Please sign in to comment.