{"action":"created","comment":{"url":"https://api.github.com/repos/chingventures/Medusa/pulls/comments/78425551","id":78425551,"diff_hunk":"@@ -45,17 +50,41 @@ defmodule Medusa.Broker do\n \n   def handle_cast({:publish, event, payload}, state) do\n     Logger.debug \"#{inspect __MODULE__}: [#{inspect event}]: #{inspect payload}\"\n-    Enum.each(state, fn(e) ->\n-      if Regex.match?(e, event) do\n-        @adapter.insert(base64_encode_regex(e), payload)\n-        GenServer.cast (base64_encode_regex(e) |> String.to_atom), {:trigger}\n-      end\n-    end)\n+    Enum.each(state, &maybe_route(&1, event, payload))","path":"lib/medusa/broker.ex","position":33,"original_position":33,"commit_id":"7a13593f741f4d1011e596f71d151306797f9af0","original_commit_id":"7a13593f741f4d1011e596f71d151306797f9af0","user":{"login":"mikekelly","id":55782,"avatar_url":"https://avatars.githubusercontent.com/u/55782?v=3","gravatar_id":"","url":"https://api.github.com/users/mikekelly","html_url":"https://github.com/mikekelly","followers_url":"https://api.github.com/users/mikekelly/followers","following_url":"https://api.github.com/users/mikekelly/following{/other_user}","gists_url":"https://api.github.com/users/mikekelly/gists{/gist_id}","starred_url":"https://api.github.com/users/mikekelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikekelly/subscriptions","organizations_url":"https://api.github.com/users/mikekelly/orgs","repos_url":"https://api.github.com/users/mikekelly/repos","events_url":"https://api.github.com/users/mikekelly/events{/privacy}","received_events_url":"https://api.github.com/users/mikekelly/received_events","type":"User","site_admin":false},"body":"I think we should be able to trigger these using `Task.async` or even `Task.Supervisor.async` for that matter","created_at":"2016-09-12T18:16:31Z","updated_at":"2016-09-12T18:16:31Z","html_url":"https://github.com/chingventures/Medusa/pull/1#discussion_r78425551","pull_request_url":"https://api.github.com/repos/chingventures/Medusa/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/comments/78425551"},"html":{"href":"https://github.com/chingventures/Medusa/pull/1#discussion_r78425551"},"pull_request":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/chingventures/Medusa/pulls/1","id":84912988,"html_url":"https://github.com/chingventures/Medusa/pull/1","diff_url":"https://github.com/chingventures/Medusa/pull/1.diff","patch_url":"https://github.com/chingventures/Medusa/pull/1.patch","issue_url":"https://api.github.com/repos/chingventures/Medusa/issues/1","number":1,"state":"open","locked":false,"title":"Refactor message pattern-matching","user":{"login":"ammbot","id":2728173,"avatar_url":"https://avatars.githubusercontent.com/u/2728173?v=3","gravatar_id":"","url":"https://api.github.com/users/ammbot","html_url":"https://github.com/ammbot","followers_url":"https://api.github.com/users/ammbot/followers","following_url":"https://api.github.com/users/ammbot/following{/other_user}","gists_url":"https://api.github.com/users/ammbot/gists{/gist_id}","starred_url":"https://api.github.com/users/ammbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammbot/subscriptions","organizations_url":"https://api.github.com/users/ammbot/orgs","repos_url":"https://api.github.com/users/ammbot/repos","events_url":"https://api.github.com/users/ammbot/events{/privacy}","received_events_url":"https://api.github.com/users/ammbot/received_events","type":"User","site_admin":false},"body":"- Using struct in Broker.Message for messaging\r\n- Routing is change from Regex to \".\" style\r\n- Change Producter dispatcher to BroadcastDispatcher","created_at":"2016-09-12T17:40:59Z","updated_at":"2016-09-12T18:16:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a78097473d468e44ab1129d3bdf3b55e7cf2985e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/chingventures/Medusa/pulls/1/commits","review_comments_url":"https://api.github.com/repos/chingventures/Medusa/pulls/1/comments","review_comment_url":"https://api.github.com/repos/chingventures/Medusa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chingventures/Medusa/issues/1/comments","statuses_url":"https://api.github.com/repos/chingventures/Medusa/statuses/7a13593f741f4d1011e596f71d151306797f9af0","head":{"label":"ammbot:refactor-message-pattern","ref":"refactor-message-pattern","sha":"7a13593f741f4d1011e596f71d151306797f9af0","user":{"login":"ammbot","id":2728173,"avatar_url":"https://avatars.githubusercontent.com/u/2728173?v=3","gravatar_id":"","url":"https://api.github.com/users/ammbot","html_url":"https://github.com/ammbot","followers_url":"https://api.github.com/users/ammbot/followers","following_url":"https://api.github.com/users/ammbot/following{/other_user}","gists_url":"https://api.github.com/users/ammbot/gists{/gist_id}","starred_url":"https://api.github.com/users/ammbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammbot/subscriptions","organizations_url":"https://api.github.com/users/ammbot/orgs","repos_url":"https://api.github.com/users/ammbot/repos","events_url":"https://api.github.com/users/ammbot/events{/privacy}","received_events_url":"https://api.github.com/users/ammbot/received_events","type":"User","site_admin":false},"repo":{"id":68032193,"name":"Medusa","full_name":"ammbot/Medusa","owner":{"login":"ammbot","id":2728173,"avatar_url":"https://avatars.githubusercontent.com/u/2728173?v=3","gravatar_id":"","url":"https://api.github.com/users/ammbot","html_url":"https://github.com/ammbot","followers_url":"https://api.github.com/users/ammbot/followers","following_url":"https://api.github.com/users/ammbot/following{/other_user}","gists_url":"https://api.github.com/users/ammbot/gists{/gist_id}","starred_url":"https://api.github.com/users/ammbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ammbot/subscriptions","organizations_url":"https://api.github.com/users/ammbot/orgs","repos_url":"https://api.github.com/users/ammbot/repos","events_url":"https://api.github.com/users/ammbot/events{/privacy}","received_events_url":"https://api.github.com/users/ammbot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ammbot/Medusa","description":null,"fork":true,"url":"https://api.github.com/repos/ammbot/Medusa","forks_url":"https://api.github.com/repos/ammbot/Medusa/forks","keys_url":"https://api.github.com/repos/ammbot/Medusa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ammbot/Medusa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ammbot/Medusa/teams","hooks_url":"https://api.github.com/repos/ammbot/Medusa/hooks","issue_events_url":"https://api.github.com/repos/ammbot/Medusa/issues/events{/number}","events_url":"https://api.github.com/repos/ammbot/Medusa/events","assignees_url":"https://api.github.com/repos/ammbot/Medusa/assignees{/user}","branches_url":"https://api.github.com/repos/ammbot/Medusa/branches{/branch}","tags_url":"https://api.github.com/repos/ammbot/Medusa/tags","blobs_url":"https://api.github.com/repos/ammbot/Medusa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ammbot/Medusa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ammbot/Medusa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ammbot/Medusa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ammbot/Medusa/statuses/{sha}","languages_url":"https://api.github.com/repos/ammbot/Medusa/languages","stargazers_url":"https://api.github.com/repos/ammbot/Medusa/stargazers","contributors_url":"https://api.github.com/repos/ammbot/Medusa/contributors","subscribers_url":"https://api.github.com/repos/ammbot/Medusa/subscribers","subscription_url":"https://api.github.com/repos/ammbot/Medusa/subscription","commits_url":"https://api.github.com/repos/ammbot/Medusa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ammbot/Medusa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ammbot/Medusa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ammbot/Medusa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ammbot/Medusa/contents/{+path}","compare_url":"https://api.github.com/repos/ammbot/Medusa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ammbot/Medusa/merges","archive_url":"https://api.github.com/repos/ammbot/Medusa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ammbot/Medusa/downloads","issues_url":"https://api.github.com/repos/ammbot/Medusa/issues{/number}","pulls_url":"https://api.github.com/repos/ammbot/Medusa/pulls{/number}","milestones_url":"https://api.github.com/repos/ammbot/Medusa/milestones{/number}","notifications_url":"https://api.github.com/repos/ammbot/Medusa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ammbot/Medusa/labels{/name}","releases_url":"https://api.github.com/repos/ammbot/Medusa/releases{/id}","deployments_url":"https://api.github.com/repos/ammbot/Medusa/deployments","created_at":"2016-09-12T17:37:36Z","updated_at":"2016-09-12T17:37:37Z","pushed_at":"2016-09-12T17:38:10Z","git_url":"git://github.com/ammbot/Medusa.git","ssh_url":"git@github.com:ammbot/Medusa.git","clone_url":"https://github.com/ammbot/Medusa.git","svn_url":"https://github.com/ammbot/Medusa","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"chingventures:master","ref":"master","sha":"489d24cea6f3ff4562b5a3e9b2b736ad14db2507","user":{"login":"chingventures","id":19295266,"avatar_url":"https://avatars.githubusercontent.com/u/19295266?v=3","gravatar_id":"","url":"https://api.github.com/users/chingventures","html_url":"https://github.com/chingventures","followers_url":"https://api.github.com/users/chingventures/followers","following_url":"https://api.github.com/users/chingventures/following{/other_user}","gists_url":"https://api.github.com/users/chingventures/gists{/gist_id}","starred_url":"https://api.github.com/users/chingventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingventures/subscriptions","organizations_url":"https://api.github.com/users/chingventures/orgs","repos_url":"https://api.github.com/users/chingventures/repos","events_url":"https://api.github.com/users/chingventures/events{/privacy}","received_events_url":"https://api.github.com/users/chingventures/received_events","type":"Organization","site_admin":false},"repo":{"id":64401593,"name":"Medusa","full_name":"chingventures/Medusa","owner":{"login":"chingventures","id":19295266,"avatar_url":"https://avatars.githubusercontent.com/u/19295266?v=3","gravatar_id":"","url":"https://api.github.com/users/chingventures","html_url":"https://github.com/chingventures","followers_url":"https://api.github.com/users/chingventures/followers","following_url":"https://api.github.com/users/chingventures/following{/other_user}","gists_url":"https://api.github.com/users/chingventures/gists{/gist_id}","starred_url":"https://api.github.com/users/chingventures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chingventures/subscriptions","organizations_url":"https://api.github.com/users/chingventures/orgs","repos_url":"https://api.github.com/users/chingventures/repos","events_url":"https://api.github.com/users/chingventures/events{/privacy}","received_events_url":"https://api.github.com/users/chingventures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chingventures/Medusa","description":null,"fork":false,"url":"https://api.github.com/repos/chingventures/Medusa","forks_url":"https://api.github.com/repos/chingventures/Medusa/forks","keys_url":"https://api.github.com/repos/chingventures/Medusa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chingventures/Medusa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chingventures/Medusa/teams","hooks_url":"https://api.github.com/repos/chingventures/Medusa/hooks","issue_events_url":"https://api.github.com/repos/chingventures/Medusa/issues/events{/number}","events_url":"https://api.github.com/repos/chingventures/Medusa/events","assignees_url":"https://api.github.com/repos/chingventures/Medusa/assignees{/user}","branches_url":"https://api.github.com/repos/chingventures/Medusa/branches{/branch}","tags_url":"https://api.github.com/repos/chingventures/Medusa/tags","blobs_url":"https://api.github.com/repos/chingventures/Medusa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chingventures/Medusa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chingventures/Medusa/git/refs{/sha}","trees_url":"https://api.github.com/repos/chingventures/Medusa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chingventures/Medusa/statuses/{sha}","languages_url":"https://api.github.com/repos/chingventures/Medusa/languages","stargazers_url":"https://api.github.com/repos/chingventures/Medusa/stargazers","contributors_url":"https://api.github.com/repos/chingventures/Medusa/contributors","subscribers_url":"https://api.github.com/repos/chingventures/Medusa/subscribers","subscription_url":"https://api.github.com/repos/chingventures/Medusa/subscription","commits_url":"https://api.github.com/repos/chingventures/Medusa/commits{/sha}","git_commits_url":"https://api.github.com/repos/chingventures/Medusa/git/commits{/sha}","comments_url":"https://api.github.com/repos/chingventures/Medusa/comments{/number}","issue_comment_url":"https://api.github.com/repos/chingventures/Medusa/issues/comments{/number}","contents_url":"https://api.github.com/repos/chingventures/Medusa/contents/{+path}","compare_url":"https://api.github.com/repos/chingventures/Medusa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chingventures/Medusa/merges","archive_url":"https://api.github.com/repos/chingventures/Medusa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chingventures/Medusa/downloads","issues_url":"https://api.github.com/repos/chingventures/Medusa/issues{/number}","pulls_url":"https://api.github.com/repos/chingventures/Medusa/pulls{/number}","milestones_url":"https://api.github.com/repos/chingventures/Medusa/milestones{/number}","notifications_url":"https://api.github.com/repos/chingventures/Medusa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chingventures/Medusa/labels{/name}","releases_url":"https://api.github.com/repos/chingventures/Medusa/releases{/id}","deployments_url":"https://api.github.com/repos/chingventures/Medusa/deployments","created_at":"2016-07-28T14:19:22Z","updated_at":"2016-08-19T09:29:12Z","pushed_at":"2016-09-12T17:40:59Z","git_url":"git://github.com/chingventures/Medusa.git","ssh_url":"git@github.com:chingventures/Medusa.git","clone_url":"https://github.com/chingventures/Medusa.git","svn_url":"https://github.com/chingventures/Medusa","homepage":null,"size":14,"stargazers_count":2,"watchers_count":2,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/1"},"html":{"href":"https://github.com/chingventures/Medusa/pull/1"},"issue":{"href":"https://api.github.com/repos/chingventures/Medusa/issues/1"},"comments":{"href":"https://api.github.com/repos/chingventures/Medusa/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chingventures/Medusa/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/chingventures/Medusa/statuses/7a13593f741f4d1011e596f71d151306797f9af0"}}}}
{"actor":{"display_login":"mikekelly"}}