{"action":"created","comment":{"url":"https://api.github.com/repos/eventide-project/messaging/pulls/comments/194817579","pull_request_review_id":128061206,"id":194817579,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDgxNzU3OQ==","diff_hunk":"@@ -42,6 +42,47 @@ class Example\n           end\n         end\n       end\n+\n+      module SessionArgument\n+        class Example\n+          include Messaging::Handle\n+\n+          attr_accessor :session\n+\n+          def configure(session: nil)\n+            self.session = session\n+          end\n+        end\n+\n+        module Invalid","path":"lib/messaging/controls/handler.rb","position":null,"original_position":16,"commit_id":"d109577f898ecc416d31e89e51357a6ec2a13dce","original_commit_id":"27930217e73eae998aaaf5755cb76ff6173cc269","user":{"login":"ntl","id":31915,"node_id":"MDQ6VXNlcjMxOTE1","avatar_url":"https://avatars3.githubusercontent.com/u/31915?v=4","gravatar_id":"","url":"https://api.github.com/users/ntl","html_url":"https://github.com/ntl","followers_url":"https://api.github.com/users/ntl/followers","following_url":"https://api.github.com/users/ntl/following{/other_user}","gists_url":"https://api.github.com/users/ntl/gists{/gist_id}","starred_url":"https://api.github.com/users/ntl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntl/subscriptions","organizations_url":"https://api.github.com/users/ntl/orgs","repos_url":"https://api.github.com/users/ntl/repos","events_url":"https://api.github.com/users/ntl/events{/privacy}","received_events_url":"https://api.github.com/users/ntl/received_events","type":"User","site_admin":false},"body":"Thanks, it's corrected.","created_at":"2018-06-12T17:05:40Z","updated_at":"2018-06-12T17:05:40Z","html_url":"https://github.com/eventide-project/messaging/pull/3#discussion_r194817579","pull_request_url":"https://api.github.com/repos/eventide-project/messaging/pulls/3","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/comments/194817579"},"html":{"href":"https://github.com/eventide-project/messaging/pull/3#discussion_r194817579"},"pull_request":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/3"}},"in_reply_to_id":194815512},"pull_request":{"url":"https://api.github.com/repos/eventide-project/messaging/pulls/3","id":194331990,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MzMxOTkw","html_url":"https://github.com/eventide-project/messaging/pull/3","diff_url":"https://github.com/eventide-project/messaging/pull/3.diff","patch_url":"https://github.com/eventide-project/messaging/pull/3.patch","issue_url":"https://api.github.com/repos/eventide-project/messaging/issues/3","number":3,"state":"open","locked":false,"title":"Handlers can accept an optional session argument","user":{"login":"ntl","id":31915,"node_id":"MDQ6VXNlcjMxOTE1","avatar_url":"https://avatars3.githubusercontent.com/u/31915?v=4","gravatar_id":"","url":"https://api.github.com/users/ntl","html_url":"https://github.com/ntl","followers_url":"https://api.github.com/users/ntl/followers","following_url":"https://api.github.com/users/ntl/following{/other_user}","gists_url":"https://api.github.com/users/ntl/gists{/gist_id}","starred_url":"https://api.github.com/users/ntl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntl/subscriptions","organizations_url":"https://api.github.com/users/ntl/orgs","repos_url":"https://api.github.com/users/ntl/repos","events_url":"https://api.github.com/users/ntl/events{/privacy}","received_events_url":"https://api.github.com/users/ntl/received_events","type":"User","site_admin":false},"body":"This work is part of a greater initiative towards allowing sessions passed into the consumer to be distributed pervasively down the whole stack through the messaging handlers.\r\n\r\nWith this PR, handler classes may (or may not) define configure methods that accept an optional session parameter. When the handler is constructed via `.build`, a session value can be given that will be passed to the configure method. For example:\r\n\r\n```ruby\r\nclass SomeHandler\r\n  dependency :write, Messaging::Postgres::Write\r\n\r\n  def configure(session: nil)\r\n    Write.configure(self, session: session)\r\n  end\r\nend\r\n\r\n# some_session will get passed to configure\r\nSomeHandler.build(session: some_session)\r\n```\r\n\r\nIf the configure method does _not_ accept a session argument, `.build` will _not_ try to supply a session. For example:\r\n\r\n```ruby\r\nclass TraditionalHandler\r\n  def configure # Note: no session argument\r\n  end\r\nend\r\n\r\n# This works\r\nTraditionalHandler.build(session: some_session)\r\n```\r\n\r\nTherefore, this should _not_ be considered a breaking change.","created_at":"2018-06-12T16:04:50Z","updated_at":"2018-06-12T17:05:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"45a181df252e0f4d7824604e39bcf8e45318047a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eventide-project/messaging/pulls/3/commits","review_comments_url":"https://api.github.com/repos/eventide-project/messaging/pulls/3/comments","review_comment_url":"https://api.github.com/repos/eventide-project/messaging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eventide-project/messaging/issues/3/comments","statuses_url":"https://api.github.com/repos/eventide-project/messaging/statuses/d109577f898ecc416d31e89e51357a6ec2a13dce","head":{"label":"eventide-project:handler-optional-session-argument","ref":"handler-optional-session-argument","sha":"d109577f898ecc416d31e89e51357a6ec2a13dce","user":{"login":"eventide-project","id":15861261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODYxMjYx","avatar_url":"https://avatars1.githubusercontent.com/u/15861261?v=4","gravatar_id":"","url":"https://api.github.com/users/eventide-project","html_url":"https://github.com/eventide-project","followers_url":"https://api.github.com/users/eventide-project/followers","following_url":"https://api.github.com/users/eventide-project/following{/other_user}","gists_url":"https://api.github.com/users/eventide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/eventide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventide-project/subscriptions","organizations_url":"https://api.github.com/users/eventide-project/orgs","repos_url":"https://api.github.com/users/eventide-project/repos","events_url":"https://api.github.com/users/eventide-project/events{/privacy}","received_events_url":"https://api.github.com/users/eventide-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71945806,"node_id":"MDEwOlJlcG9zaXRvcnk3MTk0NTgwNg==","name":"messaging","full_name":"eventide-project/messaging","owner":{"login":"eventide-project","id":15861261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODYxMjYx","avatar_url":"https://avatars1.githubusercontent.com/u/15861261?v=4","gravatar_id":"","url":"https://api.github.com/users/eventide-project","html_url":"https://github.com/eventide-project","followers_url":"https://api.github.com/users/eventide-project/followers","following_url":"https://api.github.com/users/eventide-project/following{/other_user}","gists_url":"https://api.github.com/users/eventide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/eventide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventide-project/subscriptions","organizations_url":"https://api.github.com/users/eventide-project/orgs","repos_url":"https://api.github.com/users/eventide-project/repos","events_url":"https://api.github.com/users/eventide-project/events{/privacy}","received_events_url":"https://api.github.com/users/eventide-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eventide-project/messaging","description":"Event Sourcing and Microservices Stack for Ruby","fork":false,"url":"https://api.github.com/repos/eventide-project/messaging","forks_url":"https://api.github.com/repos/eventide-project/messaging/forks","keys_url":"https://api.github.com/repos/eventide-project/messaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eventide-project/messaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eventide-project/messaging/teams","hooks_url":"https://api.github.com/repos/eventide-project/messaging/hooks","issue_events_url":"https://api.github.com/repos/eventide-project/messaging/issues/events{/number}","events_url":"https://api.github.com/repos/eventide-project/messaging/events","assignees_url":"https://api.github.com/repos/eventide-project/messaging/assignees{/user}","branches_url":"https://api.github.com/repos/eventide-project/messaging/branches{/branch}","tags_url":"https://api.github.com/repos/eventide-project/messaging/tags","blobs_url":"https://api.github.com/repos/eventide-project/messaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eventide-project/messaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eventide-project/messaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/eventide-project/messaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eventide-project/messaging/statuses/{sha}","languages_url":"https://api.github.com/repos/eventide-project/messaging/languages","stargazers_url":"https://api.github.com/repos/eventide-project/messaging/stargazers","contributors_url":"https://api.github.com/repos/eventide-project/messaging/contributors","subscribers_url":"https://api.github.com/repos/eventide-project/messaging/subscribers","subscription_url":"https://api.github.com/repos/eventide-project/messaging/subscription","commits_url":"https://api.github.com/repos/eventide-project/messaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/eventide-project/messaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/eventide-project/messaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/eventide-project/messaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/eventide-project/messaging/contents/{+path}","compare_url":"https://api.github.com/repos/eventide-project/messaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eventide-project/messaging/merges","archive_url":"https://api.github.com/repos/eventide-project/messaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eventide-project/messaging/downloads","issues_url":"https://api.github.com/repos/eventide-project/messaging/issues{/number}","pulls_url":"https://api.github.com/repos/eventide-project/messaging/pulls{/number}","milestones_url":"https://api.github.com/repos/eventide-project/messaging/milestones{/number}","notifications_url":"https://api.github.com/repos/eventide-project/messaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eventide-project/messaging/labels{/name}","releases_url":"https://api.github.com/repos/eventide-project/messaging/releases{/id}","deployments_url":"https://api.github.com/repos/eventide-project/messaging/deployments","created_at":"2016-10-25T22:56:52Z","updated_at":"2018-04-04T02:02:56Z","pushed_at":"2018-06-12T17:05:33Z","git_url":"git://github.com/eventide-project/messaging.git","ssh_url":"git@github.com:eventide-project/messaging.git","clone_url":"https://github.com/eventide-project/messaging.git","svn_url":"https://github.com/eventide-project/messaging","homepage":"http://eventide-project.org","size":228,"stargazers_count":2,"watchers_count":2,"language":"Ruby","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"eventide-project:master","ref":"master","sha":"871284b920953556695bc7a1295080336c79a5e9","user":{"login":"eventide-project","id":15861261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODYxMjYx","avatar_url":"https://avatars1.githubusercontent.com/u/15861261?v=4","gravatar_id":"","url":"https://api.github.com/users/eventide-project","html_url":"https://github.com/eventide-project","followers_url":"https://api.github.com/users/eventide-project/followers","following_url":"https://api.github.com/users/eventide-project/following{/other_user}","gists_url":"https://api.github.com/users/eventide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/eventide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventide-project/subscriptions","organizations_url":"https://api.github.com/users/eventide-project/orgs","repos_url":"https://api.github.com/users/eventide-project/repos","events_url":"https://api.github.com/users/eventide-project/events{/privacy}","received_events_url":"https://api.github.com/users/eventide-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71945806,"node_id":"MDEwOlJlcG9zaXRvcnk3MTk0NTgwNg==","name":"messaging","full_name":"eventide-project/messaging","owner":{"login":"eventide-project","id":15861261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODYxMjYx","avatar_url":"https://avatars1.githubusercontent.com/u/15861261?v=4","gravatar_id":"","url":"https://api.github.com/users/eventide-project","html_url":"https://github.com/eventide-project","followers_url":"https://api.github.com/users/eventide-project/followers","following_url":"https://api.github.com/users/eventide-project/following{/other_user}","gists_url":"https://api.github.com/users/eventide-project/gists{/gist_id}","starred_url":"https://api.github.com/users/eventide-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eventide-project/subscriptions","organizations_url":"https://api.github.com/users/eventide-project/orgs","repos_url":"https://api.github.com/users/eventide-project/repos","events_url":"https://api.github.com/users/eventide-project/events{/privacy}","received_events_url":"https://api.github.com/users/eventide-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eventide-project/messaging","description":"Event Sourcing and Microservices Stack for Ruby","fork":false,"url":"https://api.github.com/repos/eventide-project/messaging","forks_url":"https://api.github.com/repos/eventide-project/messaging/forks","keys_url":"https://api.github.com/repos/eventide-project/messaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eventide-project/messaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eventide-project/messaging/teams","hooks_url":"https://api.github.com/repos/eventide-project/messaging/hooks","issue_events_url":"https://api.github.com/repos/eventide-project/messaging/issues/events{/number}","events_url":"https://api.github.com/repos/eventide-project/messaging/events","assignees_url":"https://api.github.com/repos/eventide-project/messaging/assignees{/user}","branches_url":"https://api.github.com/repos/eventide-project/messaging/branches{/branch}","tags_url":"https://api.github.com/repos/eventide-project/messaging/tags","blobs_url":"https://api.github.com/repos/eventide-project/messaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eventide-project/messaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eventide-project/messaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/eventide-project/messaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eventide-project/messaging/statuses/{sha}","languages_url":"https://api.github.com/repos/eventide-project/messaging/languages","stargazers_url":"https://api.github.com/repos/eventide-project/messaging/stargazers","contributors_url":"https://api.github.com/repos/eventide-project/messaging/contributors","subscribers_url":"https://api.github.com/repos/eventide-project/messaging/subscribers","subscription_url":"https://api.github.com/repos/eventide-project/messaging/subscription","commits_url":"https://api.github.com/repos/eventide-project/messaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/eventide-project/messaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/eventide-project/messaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/eventide-project/messaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/eventide-project/messaging/contents/{+path}","compare_url":"https://api.github.com/repos/eventide-project/messaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eventide-project/messaging/merges","archive_url":"https://api.github.com/repos/eventide-project/messaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eventide-project/messaging/downloads","issues_url":"https://api.github.com/repos/eventide-project/messaging/issues{/number}","pulls_url":"https://api.github.com/repos/eventide-project/messaging/pulls{/number}","milestones_url":"https://api.github.com/repos/eventide-project/messaging/milestones{/number}","notifications_url":"https://api.github.com/repos/eventide-project/messaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eventide-project/messaging/labels{/name}","releases_url":"https://api.github.com/repos/eventide-project/messaging/releases{/id}","deployments_url":"https://api.github.com/repos/eventide-project/messaging/deployments","created_at":"2016-10-25T22:56:52Z","updated_at":"2018-04-04T02:02:56Z","pushed_at":"2018-06-12T17:05:33Z","git_url":"git://github.com/eventide-project/messaging.git","ssh_url":"git@github.com:eventide-project/messaging.git","clone_url":"https://github.com/eventide-project/messaging.git","svn_url":"https://github.com/eventide-project/messaging","homepage":"http://eventide-project.org","size":228,"stargazers_count":2,"watchers_count":2,"language":"Ruby","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/3"},"html":{"href":"https://github.com/eventide-project/messaging/pull/3"},"issue":{"href":"https://api.github.com/repos/eventide-project/messaging/issues/3"},"comments":{"href":"https://api.github.com/repos/eventide-project/messaging/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eventide-project/messaging/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/eventide-project/messaging/statuses/d109577f898ecc416d31e89e51357a6ec2a13dce"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ntl"}}