Docs: Fix broken watcher example using multi line strings
Original commit: elastic/x-pack-elasticsearch@7398be67c4
This commit is contained in:
parent
039cf42fdf
commit
a90cd81f99
|
@ -48,15 +48,13 @@ For example, the following `webhook` action creates a new issue in GitHub:
|
|||
--------------------------------------------------
|
||||
"actions" : {
|
||||
"create_github_issue" : {
|
||||
"transform": {
|
||||
"script": "return ['title':'Found errors in \\'contact.html\\'', 'body' : 'Found ' + ctx.payload.hits.total + ' errors in the last 5 minutes', 'assignee' : 'web-admin', 'labels' : ['bug','sev2']]"
|
||||
},
|
||||
"webhook" : {
|
||||
"method" : "POST",
|
||||
"url" : "https://api.github.com/repos/<owner>/<repo>/issues",
|
||||
"body" : "{
|
||||
\"title\": \"Found errors in 'contact.html'\",
|
||||
\"body\": \"Found {{ctx.payload.hits.total}} errors in the last 5 minutes\",
|
||||
\"assignee\": \"web-admin\",
|
||||
\"labels\": [ \"bug\", \"sev2\" ]
|
||||
}",
|
||||
"body": "{{#toJson}}ctx.payload{{/toJson}}",
|
||||
"auth" : {
|
||||
"basic" : {
|
||||
"username" : "<username>", <1>
|
||||
|
|
Loading…
Reference in New Issue