summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNat Morris <nat@nuqe.net>2017-11-09 22:14:37 +0000
committerNeil Lathwood <neil@lathwood.co.uk>2017-11-09 22:14:37 +0000
commitaa0e1808f25e5e8b1a76f34c29f2eeb7db75a7c7 (patch)
tree00367327d8f382f1403a9329eb2aae630170af7e /docs
parent853480fca54492a38feaa4fa76941e88f54f11a8 (diff)
feature: Slack hook - optionally disable diff snippets and post custom messages (#763)
* continue to diffs by default, but optionally post formatted messages * updated readme * remove static channel name * Update Hooks.md
Diffstat (limited to 'docs')
-rw-r--r--docs/Hooks.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/Hooks.md b/docs/Hooks.md
index bf6ea54..ca99034 100644
--- a/docs/Hooks.md
+++ b/docs/Hooks.md
@@ -140,6 +140,19 @@ hooks:
channel: "#network-changes"
```
+Optionally you can disable snippets and post a formatted message, for instance linking to a commit in a git repo. Named parameters `%{node}`, `%{group}`, `%{model}` and `%{commitref}` are available.
+
+``` yaml
+hooks:
+ slack:
+ type: slackdiff
+ events: [post_store]
+ token: SLACK_BOT_TOKEN
+ channel: "#network-changes"
+ diff: false
+ message: "%{node} %{group} %{model} updated https://git.intranet/network-changes/commit/%{commitref}"
+```
+
Note the channel name must be in quotes.
## Hook type: xmppdiff