payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/comments/329704152","pull_request_review_id":295142376,"id":329704152,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyOTcwNDE1Mg==","diff_hunk":"@@ -399,17 +443,20 @@ type handler struct {\n \tcloseCh chan struct{}\n }\n \n-func (h *handler) run(middlewares []HandlerMiddleware) {\n+func (h *handler) run(middlewares []Middleware) {\n \th.logger.Info(\"Starting handler\", watermill.LogFields{\n \t\t\"subscriber_name\": h.name,\n \t\t\"topic\":           h.subscribeTopic,\n \t})\n \n \tmiddlewareHandler := h.handlerFunc\n-\n-\t// first added middlewares should be executed first (so should be at the top of call stack)\n-\tfor i := len(middlewares) - 1; i >= 0; i-- {\n-\t\tmiddlewareHandler = middlewares[i](middlewareHandler)\n+\tfor i := 0; i < len(middlewares); i++ {\n+\t\tcurrentMiddleware := middlewares[i]\n+\t\tisGeneral := currentMiddleware.HandlerName == \"\"\n+\t\tisHandlerMiddleware := currentMiddleware.HandlerName == currentMiddleware.HandlerName","path":"message/router.go","position":98,"original_position":98,"commit_id":"d033e49e17ddc79972cae2c4042d541817134763","original_commit_id":"d033e49e17ddc79972cae2c4042d541817134763","user":{"login":"golangcibot","id":42910462,"node_id":"MDQ6VXNlcjQyOTEwNDYy","avatar_url":"https://avatars1.githubusercontent.com/u/42910462?v=4","gravatar_id":"","url":"https://api.github.com/users/golangcibot","html_url":"https://github.com/golangcibot","followers_url":"https://api.github.com/users/golangcibot/followers","following_url":"https://api.github.com/users/golangcibot/following{/other_user}","gists_url":"https://api.github.com/users/golangcibot/gists{/gist_id}","starred_url":"https://api.github.com/users/golangcibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golangcibot/subscriptions","organizations_url":"https://api.github.com/users/golangcibot/orgs","repos_url":"https://api.github.com/users/golangcibot/repos","events_url":"https://api.github.com/users/golangcibot/events{/privacy}","received_events_url":"https://api.github.com/users/golangcibot/received_events","type":"User","site_admin":false},"body":"SA4000: identical expressions on the left and right side of the '==' operator (from `staticcheck`)","created_at":"2019-09-30T17:44:53Z","updated_at":"2019-09-30T17:44:54Z","html_url":"https://github.com/ThreeDotsLabs/watermill/pull/149#discussion_r329704152","pull_request_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/comments/329704152"},"html":{"href":"https://github.com/ThreeDotsLabs/watermill/pull/149#discussion_r329704152"},"pull_request":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149","id":322897008,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIyODk3MDA4","html_url":"https://github.com/ThreeDotsLabs/watermill/pull/149","diff_url":"https://github.com/ThreeDotsLabs/watermill/pull/149.diff","patch_url":"https://github.com/ThreeDotsLabs/watermill/pull/149.patch","issue_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/149","number":149,"state":"open","locked":false,"title":"Middleware per handler #133","user":{"login":"0michalsokolowski0","id":53563914,"node_id":"MDQ6VXNlcjUzNTYzOTE0","avatar_url":"https://avatars2.githubusercontent.com/u/53563914?v=4","gravatar_id":"","url":"https://api.github.com/users/0michalsokolowski0","html_url":"https://github.com/0michalsokolowski0","followers_url":"https://api.github.com/users/0michalsokolowski0/followers","following_url":"https://api.github.com/users/0michalsokolowski0/following{/other_user}","gists_url":"https://api.github.com/users/0michalsokolowski0/gists{/gist_id}","starred_url":"https://api.github.com/users/0michalsokolowski0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0michalsokolowski0/subscriptions","organizations_url":"https://api.github.com/users/0michalsokolowski0/orgs","repos_url":"https://api.github.com/users/0michalsokolowski0/repos","events_url":"https://api.github.com/users/0michalsokolowski0/events{/privacy}","received_events_url":"https://api.github.com/users/0michalsokolowski0/received_events","type":"User","site_admin":false},"body":"- Implemented Middleware per handler\r\n- Added tests","created_at":"2019-09-30T17:42:43Z","updated_at":"2019-09-30T17:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a662c58f905b0b8980768c6caa926374ba07cc00","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149/commits","review_comments_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149/comments","review_comment_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/149/comments","statuses_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/statuses/d033e49e17ddc79972cae2c4042d541817134763","head":{"label":"0michalsokolowski0:middleware-per-handler","ref":"middleware-per-handler","sha":"d033e49e17ddc79972cae2c4042d541817134763","user":{"login":"0michalsokolowski0","id":53563914,"node_id":"MDQ6VXNlcjUzNTYzOTE0","avatar_url":"https://avatars2.githubusercontent.com/u/53563914?v=4","gravatar_id":"","url":"https://api.github.com/users/0michalsokolowski0","html_url":"https://github.com/0michalsokolowski0","followers_url":"https://api.github.com/users/0michalsokolowski0/followers","following_url":"https://api.github.com/users/0michalsokolowski0/following{/other_user}","gists_url":"https://api.github.com/users/0michalsokolowski0/gists{/gist_id}","starred_url":"https://api.github.com/users/0michalsokolowski0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0michalsokolowski0/subscriptions","organizations_url":"https://api.github.com/users/0michalsokolowski0/orgs","repos_url":"https://api.github.com/users/0michalsokolowski0/repos","events_url":"https://api.github.com/users/0michalsokolowski0/events{/privacy}","received_events_url":"https://api.github.com/users/0michalsokolowski0/received_events","type":"User","site_admin":false},"repo":{"id":211699036,"node_id":"MDEwOlJlcG9zaXRvcnkyMTE2OTkwMzY=","name":"watermill","full_name":"0michalsokolowski0/watermill","private":false,"owner":{"login":"0michalsokolowski0","id":53563914,"node_id":"MDQ6VXNlcjUzNTYzOTE0","avatar_url":"https://avatars2.githubusercontent.com/u/53563914?v=4","gravatar_id":"","url":"https://api.github.com/users/0michalsokolowski0","html_url":"https://github.com/0michalsokolowski0","followers_url":"https://api.github.com/users/0michalsokolowski0/followers","following_url":"https://api.github.com/users/0michalsokolowski0/following{/other_user}","gists_url":"https://api.github.com/users/0michalsokolowski0/gists{/gist_id}","starred_url":"https://api.github.com/users/0michalsokolowski0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0michalsokolowski0/subscriptions","organizations_url":"https://api.github.com/users/0michalsokolowski0/orgs","repos_url":"https://api.github.com/users/0michalsokolowski0/repos","events_url":"https://api.github.com/users/0michalsokolowski0/events{/privacy}","received_events_url":"https://api.github.com/users/0michalsokolowski0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/0michalsokolowski0/watermill","description":"Building event-driven applications easy way in Go.","fork":true,"url":"https://api.github.com/repos/0michalsokolowski0/watermill","forks_url":"https://api.github.com/repos/0michalsokolowski0/watermill/forks","keys_url":"https://api.github.com/repos/0michalsokolowski0/watermill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0michalsokolowski0/watermill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0michalsokolowski0/watermill/teams","hooks_url":"https://api.github.com/repos/0michalsokolowski0/watermill/hooks","issue_events_url":"https://api.github.com/repos/0michalsokolowski0/watermill/issues/events{/number}","events_url":"https://api.github.com/repos/0michalsokolowski0/watermill/events","assignees_url":"https://api.github.com/repos/0michalsokolowski0/watermill/assignees{/user}","branches_url":"https://api.github.com/repos/0michalsokolowski0/watermill/branches{/branch}","tags_url":"https://api.github.com/repos/0michalsokolowski0/watermill/tags","blobs_url":"https://api.github.com/repos/0michalsokolowski0/watermill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0michalsokolowski0/watermill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0michalsokolowski0/watermill/git/refs{/sha}","trees_url":"https://api.github.com/repos/0michalsokolowski0/watermill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0michalsokolowski0/watermill/statuses/{sha}","languages_url":"https://api.github.com/repos/0michalsokolowski0/watermill/languages","stargazers_url":"https://api.github.com/repos/0michalsokolowski0/watermill/stargazers","contributors_url":"https://api.github.com/repos/0michalsokolowski0/watermill/contributors","subscribers_url":"https://api.github.com/repos/0michalsokolowski0/watermill/subscribers","subscription_url":"https://api.github.com/repos/0michalsokolowski0/watermill/subscription","commits_url":"https://api.github.com/repos/0michalsokolowski0/watermill/commits{/sha}","git_commits_url":"https://api.github.com/repos/0michalsokolowski0/watermill/git/commits{/sha}","comments_url":"https://api.github.com/repos/0michalsokolowski0/watermill/comments{/number}","issue_comment_url":"https://api.github.com/repos/0michalsokolowski0/watermill/issues/comments{/number}","contents_url":"https://api.github.com/repos/0michalsokolowski0/watermill/contents/{+path}","compare_url":"https://api.github.com/repos/0michalsokolowski0/watermill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0michalsokolowski0/watermill/merges","archive_url":"https://api.github.com/repos/0michalsokolowski0/watermill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0michalsokolowski0/watermill/downloads","issues_url":"https://api.github.com/repos/0michalsokolowski0/watermill/issues{/number}","pulls_url":"https://api.github.com/repos/0michalsokolowski0/watermill/pulls{/number}","milestones_url":"https://api.github.com/repos/0michalsokolowski0/watermill/milestones{/number}","notifications_url":"https://api.github.com/repos/0michalsokolowski0/watermill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0michalsokolowski0/watermill/labels{/name}","releases_url":"https://api.github.com/repos/0michalsokolowski0/watermill/releases{/id}","deployments_url":"https://api.github.com/repos/0michalsokolowski0/watermill/deployments","created_at":"2019-09-29T17:21:29Z","updated_at":"2019-09-29T17:21:31Z","pushed_at":"2019-09-30T17:41:04Z","git_url":"git://github.com/0michalsokolowski0/watermill.git","ssh_url":"git@github.com:0michalsokolowski0/watermill.git","clone_url":"https://github.com/0michalsokolowski0/watermill.git","svn_url":"https://github.com/0michalsokolowski0/watermill","homepage":"https://watermill.io/","size":1085,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ThreeDotsLabs:master","ref":"master","sha":"7140ba096c030afbda347ea756e52af790064422","user":{"login":"ThreeDotsLabs","id":16671995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjcxOTk1","avatar_url":"https://avatars3.githubusercontent.com/u/16671995?v=4","gravatar_id":"","url":"https://api.github.com/users/ThreeDotsLabs","html_url":"https://github.com/ThreeDotsLabs","followers_url":"https://api.github.com/users/ThreeDotsLabs/followers","following_url":"https://api.github.com/users/ThreeDotsLabs/following{/other_user}","gists_url":"https://api.github.com/users/ThreeDotsLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ThreeDotsLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThreeDotsLabs/subscriptions","organizations_url":"https://api.github.com/users/ThreeDotsLabs/orgs","repos_url":"https://api.github.com/users/ThreeDotsLabs/repos","events_url":"https://api.github.com/users/ThreeDotsLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ThreeDotsLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":156768326,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY3NjgzMjY=","name":"watermill","full_name":"ThreeDotsLabs/watermill","private":false,"owner":{"login":"ThreeDotsLabs","id":16671995,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjcxOTk1","avatar_url":"https://avatars3.githubusercontent.com/u/16671995?v=4","gravatar_id":"","url":"https://api.github.com/users/ThreeDotsLabs","html_url":"https://github.com/ThreeDotsLabs","followers_url":"https://api.github.com/users/ThreeDotsLabs/followers","following_url":"https://api.github.com/users/ThreeDotsLabs/following{/other_user}","gists_url":"https://api.github.com/users/ThreeDotsLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ThreeDotsLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThreeDotsLabs/subscriptions","organizations_url":"https://api.github.com/users/ThreeDotsLabs/orgs","repos_url":"https://api.github.com/users/ThreeDotsLabs/repos","events_url":"https://api.github.com/users/ThreeDotsLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ThreeDotsLabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ThreeDotsLabs/watermill","description":"Building event-driven applications easy way in Go.","fork":false,"url":"https://api.github.com/repos/ThreeDotsLabs/watermill","forks_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/forks","keys_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/teams","hooks_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/hooks","issue_events_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/events{/number}","events_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/events","assignees_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/assignees{/user}","branches_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/branches{/branch}","tags_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/tags","blobs_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/statuses/{sha}","languages_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/languages","stargazers_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/stargazers","contributors_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/contributors","subscribers_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/subscribers","subscription_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/subscription","commits_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/contents/{+path}","compare_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/merges","archive_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/downloads","issues_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues{/number}","pulls_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls{/number}","milestones_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/milestones{/number}","notifications_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/labels{/name}","releases_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/releases{/id}","deployments_url":"https://api.github.com/repos/ThreeDotsLabs/watermill/deployments","created_at":"2018-11-08T21:01:09Z","updated_at":"2019-09-30T17:06:15Z","pushed_at":"2019-09-30T17:42:44Z","git_url":"git://github.com/ThreeDotsLabs/watermill.git","ssh_url":"git@github.com:ThreeDotsLabs/watermill.git","clone_url":"https://github.com/ThreeDotsLabs/watermill.git","svn_url":"https://github.com/ThreeDotsLabs/watermill","homepage":"https://watermill.io/","size":1080,"stargazers_count":1222,"watchers_count":1222,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":57,"open_issues":24,"watchers":1222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149"},"html":{"href":"https://github.com/ThreeDotsLabs/watermill/pull/149"},"issue":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/149"},"comments":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/ThreeDotsLabs/watermill/statuses/d033e49e17ddc79972cae2c4042d541817134763"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"golangcibot"}}