{"action":"opened","number":889,"pull_request":{"url":"https://api.github.com/repos/flapjack/flapjack/pulls/889","id":40440721,"html_url":"https://github.com/flapjack/flapjack/pull/889","diff_url":"https://github.com/flapjack/flapjack/pull/889.diff","patch_url":"https://github.com/flapjack/flapjack/pull/889.patch","issue_url":"https://api.github.com/repos/flapjack/flapjack/issues/889","number":889,"state":"open","locked":false,"title":"Feature/1.x webhook support","user":{"login":"jerbob92","id":1312921,"avatar_url":"https://avatars.githubusercontent.com/u/1312921?v=3","gravatar_id":"","url":"https://api.github.com/users/jerbob92","html_url":"https://github.com/jerbob92","followers_url":"https://api.github.com/users/jerbob92/followers","following_url":"https://api.github.com/users/jerbob92/following{/other_user}","gists_url":"https://api.github.com/users/jerbob92/gists{/gist_id}","starred_url":"https://api.github.com/users/jerbob92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerbob92/subscriptions","organizations_url":"https://api.github.com/users/jerbob92/orgs","repos_url":"https://api.github.com/users/jerbob92/repos","events_url":"https://api.github.com/users/jerbob92/events{/privacy}","received_events_url":"https://api.github.com/users/jerbob92/received_events","type":"User","site_admin":false},"body":"I created a basic webhook notification implementation so people can make Flapjack integration without messing with the Flapjack source.\r\n\r\nThe webhook sends the alert details in json to the URL. Multiple URLs can be configured. \r\nOther actions can then be done with the Flapjack API.\r\n\r\nI did not create this in the 2.x branch as contacts seem pretty broken in there. Maybe it can easily be merged into 2.x though.\r\n\r\nHere is a basic example to receive the notifications in NodeJS (requires express) which works with the example configuration:\r\n\r\n```javascript\r\nvar express = require('express'),\r\n    app = express();\r\napp.use(express.bodyParser());\r\napp.use(express.logger(\"default\"));\r\n\r\nvar callback = function (req, res) {\r\n    console.log(req.body);\r\n};\r\n\r\napp.post('/flapjack_notification', callback);\r\n\r\napp.listen(80);\r\n```","created_at":"2015-07-21T10:00:11Z","updated_at":"2015-07-21T10:00:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8556f0d2d511d38edde519557d437913c5cc38db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flapjack/flapjack/pulls/889/commits","review_comments_url":"https://api.github.com/repos/flapjack/flapjack/pulls/889/comments","review_comment_url":"https://api.github.com/repos/flapjack/flapjack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flapjack/flapjack/issues/889/comments","statuses_url":"https://api.github.com/repos/flapjack/flapjack/statuses/2ad42d489ae13a7bb22148a72fb6f17750165f5e","head":{"label":"VDMi:feature/1.x-webhook-support","ref":"feature/1.x-webhook-support","sha":"2ad42d489ae13a7bb22148a72fb6f17750165f5e","user":{"login":"VDMi","id":7194434,"avatar_url":"https://avatars.githubusercontent.com/u/7194434?v=3","gravatar_id":"","url":"https://api.github.com/users/VDMi","html_url":"https://github.com/VDMi","followers_url":"https://api.github.com/users/VDMi/followers","following_url":"https://api.github.com/users/VDMi/following{/other_user}","gists_url":"https://api.github.com/users/VDMi/gists{/gist_id}","starred_url":"https://api.github.com/users/VDMi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VDMi/subscriptions","organizations_url":"https://api.github.com/users/VDMi/orgs","repos_url":"https://api.github.com/users/VDMi/repos","events_url":"https://api.github.com/users/VDMi/events{/privacy}","received_events_url":"https://api.github.com/users/VDMi/received_events","type":"Organization","site_admin":false},"repo":{"id":39430290,"name":"flapjack","full_name":"VDMi/flapjack","owner":{"login":"VDMi","id":7194434,"avatar_url":"https://avatars.githubusercontent.com/u/7194434?v=3","gravatar_id":"","url":"https://api.github.com/users/VDMi","html_url":"https://github.com/VDMi","followers_url":"https://api.github.com/users/VDMi/followers","following_url":"https://api.github.com/users/VDMi/following{/other_user}","gists_url":"https://api.github.com/users/VDMi/gists{/gist_id}","starred_url":"https://api.github.com/users/VDMi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VDMi/subscriptions","organizations_url":"https://api.github.com/users/VDMi/orgs","repos_url":"https://api.github.com/users/VDMi/repos","events_url":"https://api.github.com/users/VDMi/events{/privacy}","received_events_url":"https://api.github.com/users/VDMi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VDMi/flapjack","description":"Monitoring notification routing + event processing system.  For issues with the Flapjack packages, please see https://github.com/flapjack/omnibus-flapjack/","fork":true,"url":"https://api.github.com/repos/VDMi/flapjack","forks_url":"https://api.github.com/repos/VDMi/flapjack/forks","keys_url":"https://api.github.com/repos/VDMi/flapjack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VDMi/flapjack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VDMi/flapjack/teams","hooks_url":"https://api.github.com/repos/VDMi/flapjack/hooks","issue_events_url":"https://api.github.com/repos/VDMi/flapjack/issues/events{/number}","events_url":"https://api.github.com/repos/VDMi/flapjack/events","assignees_url":"https://api.github.com/repos/VDMi/flapjack/assignees{/user}","branches_url":"https://api.github.com/repos/VDMi/flapjack/branches{/branch}","tags_url":"https://api.github.com/repos/VDMi/flapjack/tags","blobs_url":"https://api.github.com/repos/VDMi/flapjack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VDMi/flapjack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VDMi/flapjack/git/refs{/sha}","trees_url":"https://api.github.com/repos/VDMi/flapjack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VDMi/flapjack/statuses/{sha}","languages_url":"https://api.github.com/repos/VDMi/flapjack/languages","stargazers_url":"https://api.github.com/repos/VDMi/flapjack/stargazers","contributors_url":"https://api.github.com/repos/VDMi/flapjack/contributors","subscribers_url":"https://api.github.com/repos/VDMi/flapjack/subscribers","subscription_url":"https://api.github.com/repos/VDMi/flapjack/subscription","commits_url":"https://api.github.com/repos/VDMi/flapjack/commits{/sha}","git_commits_url":"https://api.github.com/repos/VDMi/flapjack/git/commits{/sha}","comments_url":"https://api.github.com/repos/VDMi/flapjack/comments{/number}","issue_comment_url":"https://api.github.com/repos/VDMi/flapjack/issues/comments{/number}","contents_url":"https://api.github.com/repos/VDMi/flapjack/contents/{+path}","compare_url":"https://api.github.com/repos/VDMi/flapjack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VDMi/flapjack/merges","archive_url":"https://api.github.com/repos/VDMi/flapjack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VDMi/flapjack/downloads","issues_url":"https://api.github.com/repos/VDMi/flapjack/issues{/number}","pulls_url":"https://api.github.com/repos/VDMi/flapjack/pulls{/number}","milestones_url":"https://api.github.com/repos/VDMi/flapjack/milestones{/number}","notifications_url":"https://api.github.com/repos/VDMi/flapjack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VDMi/flapjack/labels{/name}","releases_url":"https://api.github.com/repos/VDMi/flapjack/releases{/id}","created_at":"2015-07-21T07:17:18Z","updated_at":"2015-07-21T07:17:19Z","pushed_at":"2015-07-21T09:55:42Z","git_url":"git://github.com/VDMi/flapjack.git","ssh_url":"git@github.com:VDMi/flapjack.git","clone_url":"https://github.com/VDMi/flapjack.git","svn_url":"https://github.com/VDMi/flapjack","homepage":"http://flapjack.io","size":22460,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flapjack:maint/1.x","ref":"maint/1.x","sha":"358aae8b5161cce739ca9187068387a2b62fdc13","user":{"login":"flapjack","id":2343953,"avatar_url":"https://avatars.githubusercontent.com/u/2343953?v=3","gravatar_id":"","url":"https://api.github.com/users/flapjack","html_url":"https://github.com/flapjack","followers_url":"https://api.github.com/users/flapjack/followers","following_url":"https://api.github.com/users/flapjack/following{/other_user}","gists_url":"https://api.github.com/users/flapjack/gists{/gist_id}","starred_url":"https://api.github.com/users/flapjack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flapjack/subscriptions","organizations_url":"https://api.github.com/users/flapjack/orgs","repos_url":"https://api.github.com/users/flapjack/repos","events_url":"https://api.github.com/users/flapjack/events{/privacy}","received_events_url":"https://api.github.com/users/flapjack/received_events","type":"Organization","site_admin":false},"repo":{"id":145744,"name":"flapjack","full_name":"flapjack/flapjack","owner":{"login":"flapjack","id":2343953,"avatar_url":"https://avatars.githubusercontent.com/u/2343953?v=3","gravatar_id":"","url":"https://api.github.com/users/flapjack","html_url":"https://github.com/flapjack","followers_url":"https://api.github.com/users/flapjack/followers","following_url":"https://api.github.com/users/flapjack/following{/other_user}","gists_url":"https://api.github.com/users/flapjack/gists{/gist_id}","starred_url":"https://api.github.com/users/flapjack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flapjack/subscriptions","organizations_url":"https://api.github.com/users/flapjack/orgs","repos_url":"https://api.github.com/users/flapjack/repos","events_url":"https://api.github.com/users/flapjack/events{/privacy}","received_events_url":"https://api.github.com/users/flapjack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flapjack/flapjack","description":"Monitoring notification routing + event processing system.  For issues with the Flapjack packages, please see https://github.com/flapjack/omnibus-flapjack/","fork":false,"url":"https://api.github.com/repos/flapjack/flapjack","forks_url":"https://api.github.com/repos/flapjack/flapjack/forks","keys_url":"https://api.github.com/repos/flapjack/flapjack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flapjack/flapjack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flapjack/flapjack/teams","hooks_url":"https://api.github.com/repos/flapjack/flapjack/hooks","issue_events_url":"https://api.github.com/repos/flapjack/flapjack/issues/events{/number}","events_url":"https://api.github.com/repos/flapjack/flapjack/events","assignees_url":"https://api.github.com/repos/flapjack/flapjack/assignees{/user}","branches_url":"https://api.github.com/repos/flapjack/flapjack/branches{/branch}","tags_url":"https://api.github.com/repos/flapjack/flapjack/tags","blobs_url":"https://api.github.com/repos/flapjack/flapjack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flapjack/flapjack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flapjack/flapjack/git/refs{/sha}","trees_url":"https://api.github.com/repos/flapjack/flapjack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flapjack/flapjack/statuses/{sha}","languages_url":"https://api.github.com/repos/flapjack/flapjack/languages","stargazers_url":"https://api.github.com/repos/flapjack/flapjack/stargazers","contributors_url":"https://api.github.com/repos/flapjack/flapjack/contributors","subscribers_url":"https://api.github.com/repos/flapjack/flapjack/subscribers","subscription_url":"https://api.github.com/repos/flapjack/flapjack/subscription","commits_url":"https://api.github.com/repos/flapjack/flapjack/commits{/sha}","git_commits_url":"https://api.github.com/repos/flapjack/flapjack/git/commits{/sha}","comments_url":"https://api.github.com/repos/flapjack/flapjack/comments{/number}","issue_comment_url":"https://api.github.com/repos/flapjack/flapjack/issues/comments{/number}","contents_url":"https://api.github.com/repos/flapjack/flapjack/contents/{+path}","compare_url":"https://api.github.com/repos/flapjack/flapjack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flapjack/flapjack/merges","archive_url":"https://api.github.com/repos/flapjack/flapjack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flapjack/flapjack/downloads","issues_url":"https://api.github.com/repos/flapjack/flapjack/issues{/number}","pulls_url":"https://api.github.com/repos/flapjack/flapjack/pulls{/number}","milestones_url":"https://api.github.com/repos/flapjack/flapjack/milestones{/number}","notifications_url":"https://api.github.com/repos/flapjack/flapjack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flapjack/flapjack/labels{/name}","releases_url":"https://api.github.com/repos/flapjack/flapjack/releases{/id}","created_at":"2009-03-08T11:47:49Z","updated_at":"2015-07-18T17:27:43Z","pushed_at":"2015-07-21T10:00:11Z","git_url":"git://github.com/flapjack/flapjack.git","ssh_url":"git@github.com:flapjack/flapjack.git","clone_url":"https://github.com/flapjack/flapjack.git","svn_url":"https://github.com/flapjack/flapjack","homepage":"http://flapjack.io","size":22460,"stargazers_count":505,"watchers_count":505,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":115,"forks":75,"open_issues":115,"watchers":505,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flapjack/flapjack/pulls/889"},"html":{"href":"https://github.com/flapjack/flapjack/pull/889"},"issue":{"href":"https://api.github.com/repos/flapjack/flapjack/issues/889"},"comments":{"href":"https://api.github.com/repos/flapjack/flapjack/issues/889/comments"},"review_comments":{"href":"https://api.github.com/repos/flapjack/flapjack/pulls/889/comments"},"review_comment":{"href":"https://api.github.com/repos/flapjack/flapjack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flapjack/flapjack/pulls/889/commits"},"statuses":{"href":"https://api.github.com/repos/flapjack/flapjack/statuses/2ad42d489ae13a7bb22148a72fb6f17750165f5e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":219,"deletions":6,"changed_files":8}}