Skip to content

Commit 9a1c978

Browse files
committed
Formatting fixes.
1 parent baa0991 commit 9a1c978

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

hooks/flowdock/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Sends a message to your Flowdock team inbox whenever an error occurs.
44

5-
* `flow_api_token` is the API token of the Flowdock flow (room).
5+
* Get your Flow API token from your Inbox Sources in the top-right corner of Flowdock.

hooks/flowdock/index.js

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,29 @@ var request = require("request");
33
exports.serviceName = "Flowdock";
44

55
exports.author = {
6-
name: "Joel Moss",
7-
8-
github: "joelmoss",
9-
twitter: "joelmoss"
6+
name: "Joel Moss",
7+
8+
github: "joelmoss",
9+
twitter: "joelmoss"
1010
};
1111

1212
exports.onError = function(error, settings, done) {
13-
14-
request({
15-
url: "https://api.flowdock.com/v1/messages/team_inbox/" + settings.flow_api_token,
16-
headers: {
17-
"Content-Type": "application/json",
18-
"User-Agent": "Errorception Notifications"
19-
},
20-
method: "post",
21-
body: JSON.stringify({
22-
source: "Errorception",
23-
from_address: "[email protected]",
24-
subject: "Errorception found an error!",
25-
content: "Errorception found an error! \"" + error.message + "\" in "
26-
+ (error.isInline?("an inline script on " + error.page):error.scriptPath)
27-
+ ". Details here: " + error.webUrl,
28-
link: error.webUrl
29-
}),
30-
timeout: 10000
31-
}, done);
13+
request({
14+
url: "https://api.flowdock.com/v1/messages/team_inbox/" + settings.flow_api_token,
15+
headers: {
16+
"Content-Type": "application/json",
17+
"User-Agent": "Errorception Notifications"
18+
},
19+
method: "post",
20+
body: JSON.stringify({
21+
source: "Errorception",
22+
from_address: "[email protected]",
23+
subject: "Errorception found an error!",
24+
content: "Errorception found an error! \"" + error.message + "\" in "
25+
+ (error.isInline?("an inline script on " + error.page):error.scriptPath)
26+
+ ". Details here: " + error.webUrl,
27+
link: error.webUrl
28+
}),
29+
timeout: 10000
30+
}, done);
3231
};

0 commit comments

Comments
 (0)