Skip to content
Permalink
Browse files

Complete readme

  • Loading branch information...
SamyPesse committed Nov 4, 2015
1 parent 5d92dc4 commit ccccba37b01756bf7c0690d52126cc13b975b4bc
Showing with 15 additions and 5 deletions.
  1. +0 −1 .foreman
  2. +1 −1 Procfile
  3. +9 −2 README.md
  4. +1 −0 {app → }/index.js
  5. +4 −1 package.json

This file was deleted.

Oops, something went wrong.
@@ -1 +1 @@
web: node app/index.js
web: node index.js
@@ -1,4 +1,11 @@
# services-slack
# Slack Wbhook Service

Slack notifications service for GitBook.
This application is a simple webhook service for GitBook that post notifications to Slack.

#### How to use it?

1. Create an `incoming-webhook` integration in slack.
2. You'll get an url like `https://hooks.slack.com/services/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`
3. Create a webhook in your book with `https://slack-service.gitbook.com/hook/v1/T032H76MF/B0DR4R4US/SBdsOaiWfAfX57DNbgZ5wdIq`
4. Done!

@@ -27,6 +27,7 @@ app.post('/hook/v1/:tokens([\\/.\\w]*|)', gitbookMiddleware, function (req, res,
slack.send({
text: '<'+build.author.urls.profile+'|'+build.author.name+'> published a new update of <'+book.urls.access+'|'+book.title+'>',
username: 'GitBook',
icon_url: 'https://www.gitbook.com/assets/images/logo/128.png'
})
.then(function() {
res.send({ ok: true });
@@ -9,7 +9,7 @@
"express": "4.13.3",
"lodash": "3.10.1",
"q": "1.4.1",
"gitbook-webhook-middleware": "1.0.0",
"gitbook-webhook-middleware": "1.0.1",
"node-slack": "0.0.7"
},
"repository": {
@@ -19,5 +19,8 @@
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/GitbookIO/services-slack/issues"
},
"scripts": {
"start": "node ./index.js"
}
}

0 comments on commit ccccba3

Please sign in to comment.
You can’t perform that action at this time.