{"action":"closed","number":8,"pull_request":{"url":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8","id":179371943,"html_url":"https://github.com/inspireteam/link-proxy/pull/8","diff_url":"https://github.com/inspireteam/link-proxy/pull/8.diff","patch_url":"https://github.com/inspireteam/link-proxy/pull/8.patch","issue_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/8","number":8,"state":"closed","locked":false,"title":"Add webhooks","user":{"login":"tusbar","id":166147,"avatar_url":"https://avatars2.githubusercontent.com/u/166147?v=4","gravatar_id":"","url":"https://api.github.com/users/tusbar","html_url":"https://github.com/tusbar","followers_url":"https://api.github.com/users/tusbar/followers","following_url":"https://api.github.com/users/tusbar/following{/other_user}","gists_url":"https://api.github.com/users/tusbar/gists{/gist_id}","starred_url":"https://api.github.com/users/tusbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tusbar/subscriptions","organizations_url":"https://api.github.com/users/tusbar/orgs","repos_url":"https://api.github.com/users/tusbar/repos","events_url":"https://api.github.com/users/tusbar/events{/privacy}","received_events_url":"https://api.github.com/users/tusbar/received_events","type":"User","site_admin":false},"body":"- [x] Reuse redis connection for multiple queues.\r\n- [x] Stop creating a useless subscriber connection in the client.\r\n- [x] Send `updated` and `created` notifications for all updated/created links, even sub-links.\r\n- [x] Make sure `User-Agent` is set for both webhooks and links analysis.\r\n- [x] Add doc in readme.\r\n\r\nExample payloads:\r\n```js\r\n{ link: '5ac5f4be269e0bf21acfb8ae',\r\n  updatedAt: '2018-04-05T12:17:53.111Z',\r\n  locations: [ 'http://localhost:3000' ],\r\n  action: 'updated',\r\n  subLink: false,\r\n  triggeredBy:\r\n   { location: 'http://localhost:3000',\r\n     link: '5ac5f4be269e0bf21acfb8ae',\r\n     check: 29 } }\r\n```\r\n\r\n```js\r\n{ link: '5ac5f4bd4bd54a6af4c4143f',\r\n  updatedAt: '2018-04-05T12:17:53.111Z',\r\n  locations: [ 'http://localhost:3000/cool2.zip' ],\r\n  action: 'updated',\r\n  subLink: true,\r\n  triggeredBy:\r\n   { location: 'http://localhost:3000',\r\n     link: '5ac5f4be269e0bf21acfb8ae',\r\n     check: 29 } }\r\n```\r\n\r\nResolve #5.","created_at":"2018-04-04T12:18:45Z","updated_at":"2018-04-06T17:12:05Z","closed_at":"2018-04-06T17:12:05Z","merged_at":"2018-04-06T17:12:05Z","merge_commit_sha":"42355269929e964576c6018d6e83fcec24df94d3","assignee":{"login":"tusbar","id":166147,"avatar_url":"https://avatars2.githubusercontent.com/u/166147?v=4","gravatar_id":"","url":"https://api.github.com/users/tusbar","html_url":"https://github.com/tusbar","followers_url":"https://api.github.com/users/tusbar/followers","following_url":"https://api.github.com/users/tusbar/following{/other_user}","gists_url":"https://api.github.com/users/tusbar/gists{/gist_id}","starred_url":"https://api.github.com/users/tusbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tusbar/subscriptions","organizations_url":"https://api.github.com/users/tusbar/orgs","repos_url":"https://api.github.com/users/tusbar/repos","events_url":"https://api.github.com/users/tusbar/events{/privacy}","received_events_url":"https://api.github.com/users/tusbar/received_events","type":"User","site_admin":false},"assignees":[{"login":"tusbar","id":166147,"avatar_url":"https://avatars2.githubusercontent.com/u/166147?v=4","gravatar_id":"","url":"https://api.github.com/users/tusbar","html_url":"https://github.com/tusbar","followers_url":"https://api.github.com/users/tusbar/followers","following_url":"https://api.github.com/users/tusbar/following{/other_user}","gists_url":"https://api.github.com/users/tusbar/gists{/gist_id}","starred_url":"https://api.github.com/users/tusbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tusbar/subscriptions","organizations_url":"https://api.github.com/users/tusbar/orgs","repos_url":"https://api.github.com/users/tusbar/repos","events_url":"https://api.github.com/users/tusbar/events{/privacy}","received_events_url":"https://api.github.com/users/tusbar/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":875926262,"url":"https://api.github.com/repos/inspireteam/link-proxy/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":{"url":"https://api.github.com/repos/inspireteam/link-proxy/milestones/1","html_url":"https://github.com/inspireteam/link-proxy/milestone/1","labels_url":"https://api.github.com/repos/inspireteam/link-proxy/milestones/1/labels","id":3221516,"number":1,"title":"1.0.0","description":null,"creator":{"login":"tusbar","id":166147,"avatar_url":"https://avatars2.githubusercontent.com/u/166147?v=4","gravatar_id":"","url":"https://api.github.com/users/tusbar","html_url":"https://github.com/tusbar","followers_url":"https://api.github.com/users/tusbar/followers","following_url":"https://api.github.com/users/tusbar/following{/other_user}","gists_url":"https://api.github.com/users/tusbar/gists{/gist_id}","starred_url":"https://api.github.com/users/tusbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tusbar/subscriptions","organizations_url":"https://api.github.com/users/tusbar/orgs","repos_url":"https://api.github.com/users/tusbar/repos","events_url":"https://api.github.com/users/tusbar/events{/privacy}","received_events_url":"https://api.github.com/users/tusbar/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":6,"state":"open","created_at":"2018-03-27T09:44:30Z","updated_at":"2018-04-06T17:12:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8/commits","review_comments_url":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8/comments","review_comment_url":"https://api.github.com/repos/inspireteam/link-proxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/8/comments","statuses_url":"https://api.github.com/repos/inspireteam/link-proxy/statuses/f75f4b3e932c3b8429838a19860f2238d51bd94d","head":{"label":"inspireteam:tusbar/hooks","ref":"tusbar/hooks","sha":"f75f4b3e932c3b8429838a19860f2238d51bd94d","user":{"login":"inspireteam","id":22120797,"avatar_url":"https://avatars0.githubusercontent.com/u/22120797?v=4","gravatar_id":"","url":"https://api.github.com/users/inspireteam","html_url":"https://github.com/inspireteam","followers_url":"https://api.github.com/users/inspireteam/followers","following_url":"https://api.github.com/users/inspireteam/following{/other_user}","gists_url":"https://api.github.com/users/inspireteam/gists{/gist_id}","starred_url":"https://api.github.com/users/inspireteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspireteam/subscriptions","organizations_url":"https://api.github.com/users/inspireteam/orgs","repos_url":"https://api.github.com/users/inspireteam/repos","events_url":"https://api.github.com/users/inspireteam/events{/privacy}","received_events_url":"https://api.github.com/users/inspireteam/received_events","type":"Organization","site_admin":false},"repo":{"id":126322522,"name":"link-proxy","full_name":"inspireteam/link-proxy","owner":{"login":"inspireteam","id":22120797,"avatar_url":"https://avatars0.githubusercontent.com/u/22120797?v=4","gravatar_id":"","url":"https://api.github.com/users/inspireteam","html_url":"https://github.com/inspireteam","followers_url":"https://api.github.com/users/inspireteam/followers","following_url":"https://api.github.com/users/inspireteam/following{/other_user}","gists_url":"https://api.github.com/users/inspireteam/gists{/gist_id}","starred_url":"https://api.github.com/users/inspireteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspireteam/subscriptions","organizations_url":"https://api.github.com/users/inspireteam/orgs","repos_url":"https://api.github.com/users/inspireteam/repos","events_url":"https://api.github.com/users/inspireteam/events{/privacy}","received_events_url":"https://api.github.com/users/inspireteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inspireteam/link-proxy","description":"Analyze links in your (geo)data catalogs","fork":false,"url":"https://api.github.com/repos/inspireteam/link-proxy","forks_url":"https://api.github.com/repos/inspireteam/link-proxy/forks","keys_url":"https://api.github.com/repos/inspireteam/link-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inspireteam/link-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inspireteam/link-proxy/teams","hooks_url":"https://api.github.com/repos/inspireteam/link-proxy/hooks","issue_events_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/inspireteam/link-proxy/events","assignees_url":"https://api.github.com/repos/inspireteam/link-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/inspireteam/link-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/inspireteam/link-proxy/tags","blobs_url":"https://api.github.com/repos/inspireteam/link-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inspireteam/link-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inspireteam/link-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/inspireteam/link-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inspireteam/link-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/inspireteam/link-proxy/languages","stargazers_url":"https://api.github.com/repos/inspireteam/link-proxy/stargazers","contributors_url":"https://api.github.com/repos/inspireteam/link-proxy/contributors","subscribers_url":"https://api.github.com/repos/inspireteam/link-proxy/subscribers","subscription_url":"https://api.github.com/repos/inspireteam/link-proxy/subscription","commits_url":"https://api.github.com/repos/inspireteam/link-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/inspireteam/link-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/inspireteam/link-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/inspireteam/link-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/inspireteam/link-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inspireteam/link-proxy/merges","archive_url":"https://api.github.com/repos/inspireteam/link-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inspireteam/link-proxy/downloads","issues_url":"https://api.github.com/repos/inspireteam/link-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/inspireteam/link-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/inspireteam/link-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/inspireteam/link-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inspireteam/link-proxy/labels{/name}","releases_url":"https://api.github.com/repos/inspireteam/link-proxy/releases{/id}","deployments_url":"https://api.github.com/repos/inspireteam/link-proxy/deployments","created_at":"2018-03-22T11:04:00Z","updated_at":"2018-04-05T16:30:01Z","pushed_at":"2018-04-06T17:12:05Z","git_url":"git://github.com/inspireteam/link-proxy.git","ssh_url":"git@github.com:inspireteam/link-proxy.git","clone_url":"https://github.com/inspireteam/link-proxy.git","svn_url":"https://github.com/inspireteam/link-proxy","homepage":null,"size":198,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"inspireteam:master","ref":"master","sha":"85018ea043507df13e1548b6373a394a3e8bf857","user":{"login":"inspireteam","id":22120797,"avatar_url":"https://avatars0.githubusercontent.com/u/22120797?v=4","gravatar_id":"","url":"https://api.github.com/users/inspireteam","html_url":"https://github.com/inspireteam","followers_url":"https://api.github.com/users/inspireteam/followers","following_url":"https://api.github.com/users/inspireteam/following{/other_user}","gists_url":"https://api.github.com/users/inspireteam/gists{/gist_id}","starred_url":"https://api.github.com/users/inspireteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspireteam/subscriptions","organizations_url":"https://api.github.com/users/inspireteam/orgs","repos_url":"https://api.github.com/users/inspireteam/repos","events_url":"https://api.github.com/users/inspireteam/events{/privacy}","received_events_url":"https://api.github.com/users/inspireteam/received_events","type":"Organization","site_admin":false},"repo":{"id":126322522,"name":"link-proxy","full_name":"inspireteam/link-proxy","owner":{"login":"inspireteam","id":22120797,"avatar_url":"https://avatars0.githubusercontent.com/u/22120797?v=4","gravatar_id":"","url":"https://api.github.com/users/inspireteam","html_url":"https://github.com/inspireteam","followers_url":"https://api.github.com/users/inspireteam/followers","following_url":"https://api.github.com/users/inspireteam/following{/other_user}","gists_url":"https://api.github.com/users/inspireteam/gists{/gist_id}","starred_url":"https://api.github.com/users/inspireteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspireteam/subscriptions","organizations_url":"https://api.github.com/users/inspireteam/orgs","repos_url":"https://api.github.com/users/inspireteam/repos","events_url":"https://api.github.com/users/inspireteam/events{/privacy}","received_events_url":"https://api.github.com/users/inspireteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inspireteam/link-proxy","description":"Analyze links in your (geo)data catalogs","fork":false,"url":"https://api.github.com/repos/inspireteam/link-proxy","forks_url":"https://api.github.com/repos/inspireteam/link-proxy/forks","keys_url":"https://api.github.com/repos/inspireteam/link-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inspireteam/link-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inspireteam/link-proxy/teams","hooks_url":"https://api.github.com/repos/inspireteam/link-proxy/hooks","issue_events_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/inspireteam/link-proxy/events","assignees_url":"https://api.github.com/repos/inspireteam/link-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/inspireteam/link-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/inspireteam/link-proxy/tags","blobs_url":"https://api.github.com/repos/inspireteam/link-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inspireteam/link-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inspireteam/link-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/inspireteam/link-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inspireteam/link-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/inspireteam/link-proxy/languages","stargazers_url":"https://api.github.com/repos/inspireteam/link-proxy/stargazers","contributors_url":"https://api.github.com/repos/inspireteam/link-proxy/contributors","subscribers_url":"https://api.github.com/repos/inspireteam/link-proxy/subscribers","subscription_url":"https://api.github.com/repos/inspireteam/link-proxy/subscription","commits_url":"https://api.github.com/repos/inspireteam/link-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/inspireteam/link-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/inspireteam/link-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/inspireteam/link-proxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/inspireteam/link-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/inspireteam/link-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inspireteam/link-proxy/merges","archive_url":"https://api.github.com/repos/inspireteam/link-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inspireteam/link-proxy/downloads","issues_url":"https://api.github.com/repos/inspireteam/link-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/inspireteam/link-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/inspireteam/link-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/inspireteam/link-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inspireteam/link-proxy/labels{/name}","releases_url":"https://api.github.com/repos/inspireteam/link-proxy/releases{/id}","deployments_url":"https://api.github.com/repos/inspireteam/link-proxy/deployments","created_at":"2018-03-22T11:04:00Z","updated_at":"2018-04-05T16:30:01Z","pushed_at":"2018-04-06T17:12:05Z","git_url":"git://github.com/inspireteam/link-proxy.git","ssh_url":"git@github.com:inspireteam/link-proxy.git","clone_url":"https://github.com/inspireteam/link-proxy.git","svn_url":"https://github.com/inspireteam/link-proxy","homepage":null,"size":198,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8"},"html":{"href":"https://github.com/inspireteam/link-proxy/pull/8"},"issue":{"href":"https://api.github.com/repos/inspireteam/link-proxy/issues/8"},"comments":{"href":"https://api.github.com/repos/inspireteam/link-proxy/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/inspireteam/link-proxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inspireteam/link-proxy/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/inspireteam/link-proxy/statuses/f75f4b3e932c3b8429838a19860f2238d51bd94d"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"tusbar","id":166147,"avatar_url":"https://avatars2.githubusercontent.com/u/166147?v=4","gravatar_id":"","url":"https://api.github.com/users/tusbar","html_url":"https://github.com/tusbar","followers_url":"https://api.github.com/users/tusbar/followers","following_url":"https://api.github.com/users/tusbar/following{/other_user}","gists_url":"https://api.github.com/users/tusbar/gists{/gist_id}","starred_url":"https://api.github.com/users/tusbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tusbar/subscriptions","organizations_url":"https://api.github.com/users/tusbar/orgs","repos_url":"https://api.github.com/users/tusbar/repos","events_url":"https://api.github.com/users/tusbar/events{/privacy}","received_events_url":"https://api.github.com/users/tusbar/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":19,"additions":297,"deletions":35,"changed_files":15}}
{"actor":{"display_login":"tusbar"}}