mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-16 18:40:19 +00:00
refactoring
This commit is contained in:
parent
6af1966ac7
commit
363a5359bd
2 changed files with 10 additions and 35 deletions
|
@ -1,39 +1,14 @@
|
|||
[
|
||||
{
|
||||
"id": "draos",
|
||||
"command": "dir",
|
||||
"secret": "",
|
||||
"trigger-rule": {
|
||||
"and": [
|
||||
{
|
||||
"match": {
|
||||
"parameter": "commits.100.id",
|
||||
"value": "20c16a7055dae65c69b9ca3f2e8cd1ac8fe9bbf2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"parameter": "ref",
|
||||
"value": "refs/heads/master"
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"parameter": "repository.id",
|
||||
"value": "17341098"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "something",
|
||||
"command": "",
|
||||
"cwd": ".",
|
||||
"trigger-rule": {
|
||||
"match": {
|
||||
"parameter": "second",
|
||||
"value": "2"
|
||||
"id": "webhook",
|
||||
"command": "/home/adnan/redeploy-go-webhook.sh",
|
||||
"cwd": "/home/adnan/go",
|
||||
"trigger-rule":
|
||||
{
|
||||
"match":
|
||||
{
|
||||
"parameter": "ref",
|
||||
"value": "refs/heads/master"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ func hookHandler(req *http.Request, params martini.Params) string {
|
|||
err := decoder.Decode(&p)
|
||||
|
||||
if err != nil {
|
||||
l4g.Warn("Error occurred while trying to parse the payload as JSON")
|
||||
l4g.Warn("Error occurred while trying to parse the payload as JSON: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue