Skip to content

Commit

Permalink
1.5.1 (#5)
Browse files Browse the repository at this point in the history
* Modify: Slack message format
  • Loading branch information
sergejmueller authored Jun 11, 2019
1 parent 033e034 commit 42162a5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# octopus / CHANGELOG

### 1.5.1 (2019-06-11)

* Modify: Slack message format


### 1.5.0 (2019-05-09)

Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [x] Ignore rel="nofollow" links
- [ ] Respect project config file
- [x] Images check
- [ ] Result export
27 changes: 26 additions & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,32 @@ const brokenLinksObserver = new Proxy(brokenLinks, {
config['slack-webhook'] && got( config['slack-webhook'], {
method: 'POST',
body: JSON.stringify({
"text": `Broken url: ${requestUrl}${EOL}Appears on: ${referenceUrl}${EOL}Status msg: ${statusMessage} (${statusCode})`
"attachments": [
{
"fallback": `Broken url: ${requestUrl}${EOL}Appears on: ${referenceUrl}${EOL}Status msg: ${statusMessage} (${statusCode})`,
"fields": [
{
"title": "Broken url",
"value": requestUrl,
},
{
"title": "Appears on",
"value": referenceUrl,
},
{
"title": "Status code",
"value": statusCode,
"short": true
},
{
"title": "Status message",
"value": statusMessage,
"short": true
}
],
"color": "danger"
}
]
})
} );
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deptagency/octopus",
"version": "1.5.0",
"version": "1.5.1",
"main": "index.js",
"license": "MIT",
"description": "Recursive and multi-threaded broken link checker",
Expand Down

0 comments on commit 42162a5

Please sign in to comment.