From f47ba2ad9730c9b0c45db9051085ece0f989e586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Thu, 26 Feb 2015 15:56:15 +0100 Subject: [PATCH 1/4] Update webhook.go misplaced closing bracket... --- webhook.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webhook.go b/webhook.go index 419808e..47519fa 100644 --- a/webhook.go +++ b/webhook.go @@ -126,9 +126,9 @@ func hookHandler(req *http.Request, params martini.Params) string { if len(req.Header.Get("X-Hub-Signature")) > 5 { payloadSignature = req.Header.Get("X-Hub-Signature")[5:] } - - go jsonHandler(params["id"], body, payloadSignature, payloadJSON) } + + go jsonHandler(params["id"], body, payloadSignature, payloadJSON) } else { req.ParseForm() go formHandler(params["id"], req.Form) From 2e16eb5d7791b813af631925b1a2b90998af787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Thu, 26 Feb 2015 15:56:41 +0100 Subject: [PATCH 2/4] bumped up the minor version --- webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webhook.go b/webhook.go index 47519fa..e8e4f5f 100644 --- a/webhook.go +++ b/webhook.go @@ -20,7 +20,7 @@ import ( ) const ( - version string = "1.0.3" + version string = "1.0.4" ) var ( From 93ab47359d1be6b17adf87f53113eb2a051569e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Thu, 26 Feb 2015 16:43:45 +0100 Subject: [PATCH 3/4] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 900bd72..6be06c1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ Hooks are defined using JSON format. The _hooks file_ must contain an array of J } ] ``` +## Passing parameters to the command +If you wish to pass parameters from the payload to the command that will be executed, you can use the `args` field in the `hook` definition. The parameters will be passed in order they are specified. If the payload does not contain the specified parameter, an empty string will be passed to the command instead. + ## Trigger rules ### And *And rule* will evaluate to _true_, if and only if all of the sub rules evaluate to _true_. From a6023dea8fad6a162321e73d29b0df7af51ec185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Sun, 8 Mar 2015 14:29:01 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6be06c1..66817db 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,10 @@ All hooks are served under the `http://ip:port/hook/:id`, where the `:id` corres Visiting `http://ip:port` will show version, uptime and number of hooks the webhook is serving. ## Todo +* Architecture overhaul to support vendor specific handlers and hook options * Add support for ip white/black listing +* Add "match-header" rule * Add "match-regex" rule +* Update README file with the description of what the tool is really trying to achieve and provide some real-life examples of usage +* Move the specific details to their respective wiki pages * ???