{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/docs/pulls/comments/100465322","pull_request_review_id":21173398,"id":100465322,"diff_hunk":"@@ -244,33 +244,43 @@ The `payload.json` attributes in the example above are as below:\n ========= ====== ============ ============================================\n Attribute Type   Flags        Description\n ========= ====== ============ ============================================\n-url       String **required** The hook url that events are notified to.\n-name      String **optional** Any name user specified.\n-filters   Array  **optional** The conditions of which events are notified. When it's not specified, or it's empty, all events will be notified to registered `url`\n+url       String **required** The hook url that events are notified to. Both http and https urls are supported.\n+name      String **optional** Any name user specified for the hook.\n+filters   Array  **optional** An array of conditions that decides which events should be notified to hook url.\n ========= ====== ============ ============================================\n \n-An example of `payload.json` with minimal attributes\n+When a hook is registered and eligible events happened, RackHD will send a ``POST request`` to the hook url. POST request's ``Content-Type`` will be ``application/json``, and the request body be the event payload.\n+\n+An example of `payload.json` with minimal attributes:\n \n .. code-block:: JSON\n \n     {\n         \"url\": \"http://www.abc.com/def\"\n     }\n \n-RackHD will send a ``POST request`` to the hook url when a hook is registered, its  ``Content-Type`` is ``application/json``, and the event payload is in the request body.\n-\n-When multiple hooks are registered, each 'url' in the hooks will receive the events.\n+When multiple hooks are registered, a single event will be sent to multiple hook urls if it meets filtering conditions.","path":"docs/rackhd/event_notification.rst","position":38,"original_position":38,"commit_id":"12c982b471f29826447717ef6b61eabfef1912c2","original_commit_id":"12c982b471f29826447717ef6b61eabfef1912c2","user":{"login":"yyscamper","id":511378,"avatar_url":"https://avatars.githubusercontent.com/u/511378?v=3","gravatar_id":"","url":"https://api.github.com/users/yyscamper","html_url":"https://github.com/yyscamper","followers_url":"https://api.github.com/users/yyscamper/followers","following_url":"https://api.github.com/users/yyscamper/following{/other_user}","gists_url":"https://api.github.com/users/yyscamper/gists{/gist_id}","starred_url":"https://api.github.com/users/yyscamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yyscamper/subscriptions","organizations_url":"https://api.github.com/users/yyscamper/orgs","repos_url":"https://api.github.com/users/yyscamper/repos","events_url":"https://api.github.com/users/yyscamper/events{/privacy}","received_events_url":"https://api.github.com/users/yyscamper/received_events","type":"User","site_admin":false},"body":"Reshape this sentence to below will be better\r\n```\r\nIf there are multiple hooks are registered, a single event will be sent to all eligible hook urls if the event matches with the hook's corresponding filter conditions.\r\n```","created_at":"2017-02-10T03:24:05Z","updated_at":"2017-02-10T03:24:05Z","html_url":"https://github.com/RackHD/docs/pull/372#discussion_r100465322","pull_request_url":"https://api.github.com/repos/RackHD/docs/pulls/372","_links":{"self":{"href":"https://api.github.com/repos/RackHD/docs/pulls/comments/100465322"},"html":{"href":"https://github.com/RackHD/docs/pull/372#discussion_r100465322"},"pull_request":{"href":"https://api.github.com/repos/RackHD/docs/pulls/372"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/docs/pulls/372","id":104949965,"html_url":"https://github.com/RackHD/docs/pull/372","diff_url":"https://github.com/RackHD/docs/pull/372.diff","patch_url":"https://github.com/RackHD/docs/pull/372.patch","issue_url":"https://api.github.com/repos/RackHD/docs/issues/372","number":372,"state":"open","locked":false,"title":"Update hook description","user":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"body":"Update hook description in event_notification section.\r\nMore details on hook filtering and hook APIs are added.","created_at":"2017-02-07T07:25:08Z","updated_at":"2017-02-10T03:24:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8f034723dd587a951ee0b4dcf7768701f311801","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/docs/pulls/372/commits","review_comments_url":"https://api.github.com/repos/RackHD/docs/pulls/372/comments","review_comment_url":"https://api.github.com/repos/RackHD/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/docs/issues/372/comments","statuses_url":"https://api.github.com/repos/RackHD/docs/statuses/12c982b471f29826447717ef6b61eabfef1912c2","head":{"label":"pengz1:Update-hook-description","ref":"Update-hook-description","sha":"12c982b471f29826447717ef6b61eabfef1912c2","user":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"repo":{"id":48404032,"name":"docs","full_name":"pengz1/docs","owner":{"login":"pengz1","id":13991453,"avatar_url":"https://avatars.githubusercontent.com/u/13991453?v=3","gravatar_id":"","url":"https://api.github.com/users/pengz1","html_url":"https://github.com/pengz1","followers_url":"https://api.github.com/users/pengz1/followers","following_url":"https://api.github.com/users/pengz1/following{/other_user}","gists_url":"https://api.github.com/users/pengz1/gists{/gist_id}","starred_url":"https://api.github.com/users/pengz1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengz1/subscriptions","organizations_url":"https://api.github.com/users/pengz1/orgs","repos_url":"https://api.github.com/users/pengz1/repos","events_url":"https://api.github.com/users/pengz1/events{/privacy}","received_events_url":"https://api.github.com/users/pengz1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pengz1/docs","description":"RackHD documentation","fork":true,"url":"https://api.github.com/repos/pengz1/docs","forks_url":"https://api.github.com/repos/pengz1/docs/forks","keys_url":"https://api.github.com/repos/pengz1/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pengz1/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pengz1/docs/teams","hooks_url":"https://api.github.com/repos/pengz1/docs/hooks","issue_events_url":"https://api.github.com/repos/pengz1/docs/issues/events{/number}","events_url":"https://api.github.com/repos/pengz1/docs/events","assignees_url":"https://api.github.com/repos/pengz1/docs/assignees{/user}","branches_url":"https://api.github.com/repos/pengz1/docs/branches{/branch}","tags_url":"https://api.github.com/repos/pengz1/docs/tags","blobs_url":"https://api.github.com/repos/pengz1/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pengz1/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pengz1/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pengz1/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pengz1/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/pengz1/docs/languages","stargazers_url":"https://api.github.com/repos/pengz1/docs/stargazers","contributors_url":"https://api.github.com/repos/pengz1/docs/contributors","subscribers_url":"https://api.github.com/repos/pengz1/docs/subscribers","subscription_url":"https://api.github.com/repos/pengz1/docs/subscription","commits_url":"https://api.github.com/repos/pengz1/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pengz1/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pengz1/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pengz1/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pengz1/docs/contents/{+path}","compare_url":"https://api.github.com/repos/pengz1/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pengz1/docs/merges","archive_url":"https://api.github.com/repos/pengz1/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pengz1/docs/downloads","issues_url":"https://api.github.com/repos/pengz1/docs/issues{/number}","pulls_url":"https://api.github.com/repos/pengz1/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/pengz1/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/pengz1/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pengz1/docs/labels{/name}","releases_url":"https://api.github.com/repos/pengz1/docs/releases{/id}","deployments_url":"https://api.github.com/repos/pengz1/docs/deployments","created_at":"2015-12-22T01:49:29Z","updated_at":"2016-06-02T02:44:51Z","pushed_at":"2017-02-09T03:46:44Z","git_url":"git://github.com/pengz1/docs.git","ssh_url":"git@github.com:pengz1/docs.git","clone_url":"https://github.com/pengz1/docs.git","svn_url":"https://github.com/pengz1/docs","homepage":null,"size":7254,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"RackHD:master","ref":"master","sha":"e4290c1e20cc2a93f2acb1ac5db893039dd4e173","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":41503759,"name":"docs","full_name":"RackHD/docs","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/docs","description":"RackHD documentation","fork":false,"url":"https://api.github.com/repos/RackHD/docs","forks_url":"https://api.github.com/repos/RackHD/docs/forks","keys_url":"https://api.github.com/repos/RackHD/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/docs/teams","hooks_url":"https://api.github.com/repos/RackHD/docs/hooks","issue_events_url":"https://api.github.com/repos/RackHD/docs/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/docs/events","assignees_url":"https://api.github.com/repos/RackHD/docs/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/docs/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/docs/tags","blobs_url":"https://api.github.com/repos/RackHD/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/docs/languages","stargazers_url":"https://api.github.com/repos/RackHD/docs/stargazers","contributors_url":"https://api.github.com/repos/RackHD/docs/contributors","subscribers_url":"https://api.github.com/repos/RackHD/docs/subscribers","subscription_url":"https://api.github.com/repos/RackHD/docs/subscription","commits_url":"https://api.github.com/repos/RackHD/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/docs/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/docs/merges","archive_url":"https://api.github.com/repos/RackHD/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/docs/downloads","issues_url":"https://api.github.com/repos/RackHD/docs/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/docs/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/docs/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/docs/deployments","created_at":"2015-08-27T18:21:08Z","updated_at":"2017-01-20T09:41:33Z","pushed_at":"2017-02-09T09:01:34Z","git_url":"git://github.com/RackHD/docs.git","ssh_url":"git@github.com:RackHD/docs.git","clone_url":"https://github.com/RackHD/docs.git","svn_url":"https://github.com/RackHD/docs","homepage":null,"size":7242,"stargazers_count":31,"watchers_count":31,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":6,"forks":46,"open_issues":6,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/docs/pulls/372"},"html":{"href":"https://github.com/RackHD/docs/pull/372"},"issue":{"href":"https://api.github.com/repos/RackHD/docs/issues/372"},"comments":{"href":"https://api.github.com/repos/RackHD/docs/issues/372/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/docs/pulls/372/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/docs/pulls/372/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/docs/statuses/12c982b471f29826447717ef6b61eabfef1912c2"}}}}
{"actor":{"display_login":"yyscamper"}}