{"action":"created","comment":{"url":"https://api.github.com/repos/chainHero/heroes-service/pulls/comments/197047511","pull_request_review_id":130702112,"id":197047511,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzA0NzUxMQ==","diff_hunk":"@@ -25,63 +29,61 @@ type FabricSetup struct {\n \tOrgAdmin        string\n \tOrgName         string\n \tUserName        string\n-\tclient          chclient.ChannelClient\n-\tadmin           resmgmt.ResourceMgmtClient\n+\tclient          *channel.Client\n+\tadmin           *resmgmt.Client\n \tsdk             *fabsdk.FabricSDK\n+\tevent           *event.Client\n }\n \n // Initialize reads the configuration file and sets up the client, chain and event hub\n func (setup *FabricSetup) Initialize() error {\n \n \t// Add parameters for the initialization\n \tif setup.initialized {\n-\t\treturn fmt.Errorf(\"sdk already initialized\")\n+\t\treturn errors.New(\"sdk already initialized\")\n \t}\n \n \t// Initialize the SDK with the configuration file\n \tsdk, err := fabsdk.New(config.FromFile(setup.ConfigFile))\n \tif err != nil {\n-\t\treturn fmt.Errorf(\"failed to create sdk: %v\", err)\n+\t\treturn errors.WithMessage(err, \"failed to create SDK\")\n \t}\n \tsetup.sdk = sdk\n+\tfmt.Println(\"SDK created\")\n \n-\t// Channel management client is responsible for managing channels (create/update channel)\n-\t// Supply user that has privileges to create channel (in this case orderer admin)\n-\tchMgmtClient, err := setup.sdk.NewClient(fabsdk.WithUser(setup.OrgAdmin), fabsdk.WithOrg(setup.OrgName)).ChannelMgmt()\n+\t// The resource management client is responsible for managing channels (create/update channel)\n+\tresourceManagerClientContext := setup.sdk.Context(fabsdk.WithUser(\"Admin\"), fabsdk.WithOrg(setup.OrgName))","path":"blockchain/setup.go","position":65,"original_position":65,"commit_id":"82a907aca6801ac70d657ef84065fac45f42d4b8","original_commit_id":"82a907aca6801ac70d657ef84065fac45f42d4b8","user":{"login":"antitoine","id":10686594,"node_id":"MDQ6VXNlcjEwNjg2NTk0","avatar_url":"https://avatars0.githubusercontent.com/u/10686594?v=4","gravatar_id":"","url":"https://api.github.com/users/antitoine","html_url":"https://github.com/antitoine","followers_url":"https://api.github.com/users/antitoine/followers","following_url":"https://api.github.com/users/antitoine/following{/other_user}","gists_url":"https://api.github.com/users/antitoine/gists{/gist_id}","starred_url":"https://api.github.com/users/antitoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antitoine/subscriptions","organizations_url":"https://api.github.com/users/antitoine/orgs","repos_url":"https://api.github.com/users/antitoine/repos","events_url":"https://api.github.com/users/antitoine/events{/privacy}","received_events_url":"https://api.github.com/users/antitoine/received_events","type":"User","site_admin":false},"body":"https://github.com/chainHero/heroes-service/blob/master/main.go#L22","created_at":"2018-06-21T08:19:52Z","updated_at":"2018-06-21T08:30:52Z","html_url":"https://github.com/chainHero/heroes-service/pull/18#discussion_r197047511","pull_request_url":"https://api.github.com/repos/chainHero/heroes-service/pulls/18","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/comments/197047511"},"html":{"href":"https://github.com/chainHero/heroes-service/pull/18#discussion_r197047511"},"pull_request":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/18"}},"in_reply_to_id":197040507},"pull_request":{"url":"https://api.github.com/repos/chainHero/heroes-service/pulls/18","id":196079271,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MDc5Mjcx","html_url":"https://github.com/chainHero/heroes-service/pull/18","diff_url":"https://github.com/chainHero/heroes-service/pull/18.diff","patch_url":"https://github.com/chainHero/heroes-service/pull/18.patch","issue_url":"https://api.github.com/repos/chainHero/heroes-service/issues/18","number":18,"state":"open","locked":false,"title":"V1.1.0","user":{"login":"MaximeAubanel","id":25589782,"node_id":"MDQ6VXNlcjI1NTg5Nzgy","avatar_url":"https://avatars1.githubusercontent.com/u/25589782?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximeAubanel","html_url":"https://github.com/MaximeAubanel","followers_url":"https://api.github.com/users/MaximeAubanel/followers","following_url":"https://api.github.com/users/MaximeAubanel/following{/other_user}","gists_url":"https://api.github.com/users/MaximeAubanel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximeAubanel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximeAubanel/subscriptions","organizations_url":"https://api.github.com/users/MaximeAubanel/orgs","repos_url":"https://api.github.com/users/MaximeAubanel/repos","events_url":"https://api.github.com/users/MaximeAubanel/events{/privacy}","received_events_url":"https://api.github.com/users/MaximeAubanel/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-20T09:42:53Z","updated_at":"2018-06-21T08:30:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7637c82fd9efe371b00c812cfbf78e69c7bcbee8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/chainHero/heroes-service/pulls/18/commits","review_comments_url":"https://api.github.com/repos/chainHero/heroes-service/pulls/18/comments","review_comment_url":"https://api.github.com/repos/chainHero/heroes-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chainHero/heroes-service/issues/18/comments","statuses_url":"https://api.github.com/repos/chainHero/heroes-service/statuses/82a907aca6801ac70d657ef84065fac45f42d4b8","head":{"label":"chainHero:v1.1.0","ref":"v1.1.0","sha":"82a907aca6801ac70d657ef84065fac45f42d4b8","user":{"login":"chainHero","id":29888859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5ODg4ODU5","avatar_url":"https://avatars2.githubusercontent.com/u/29888859?v=4","gravatar_id":"","url":"https://api.github.com/users/chainHero","html_url":"https://github.com/chainHero","followers_url":"https://api.github.com/users/chainHero/followers","following_url":"https://api.github.com/users/chainHero/following{/other_user}","gists_url":"https://api.github.com/users/chainHero/gists{/gist_id}","starred_url":"https://api.github.com/users/chainHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chainHero/subscriptions","organizations_url":"https://api.github.com/users/chainHero/orgs","repos_url":"https://api.github.com/users/chainHero/repos","events_url":"https://api.github.com/users/chainHero/events{/privacy}","received_events_url":"https://api.github.com/users/chainHero/received_events","type":"Organization","site_admin":false},"repo":{"id":96316970,"node_id":"MDEwOlJlcG9zaXRvcnk5NjMxNjk3MA==","name":"heroes-service","full_name":"chainHero/heroes-service","owner":{"login":"chainHero","id":29888859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5ODg4ODU5","avatar_url":"https://avatars2.githubusercontent.com/u/29888859?v=4","gravatar_id":"","url":"https://api.github.com/users/chainHero","html_url":"https://github.com/chainHero","followers_url":"https://api.github.com/users/chainHero/followers","following_url":"https://api.github.com/users/chainHero/following{/other_user}","gists_url":"https://api.github.com/users/chainHero/gists{/gist_id}","starred_url":"https://api.github.com/users/chainHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chainHero/subscriptions","organizations_url":"https://api.github.com/users/chainHero/orgs","repos_url":"https://api.github.com/users/chainHero/repos","events_url":"https://api.github.com/users/chainHero/events{/privacy}","received_events_url":"https://api.github.com/users/chainHero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chainHero/heroes-service","description":"Short tutorial to build a blockchain application in Go with Hyperledger Fabric","fork":false,"url":"https://api.github.com/repos/chainHero/heroes-service","forks_url":"https://api.github.com/repos/chainHero/heroes-service/forks","keys_url":"https://api.github.com/repos/chainHero/heroes-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chainHero/heroes-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chainHero/heroes-service/teams","hooks_url":"https://api.github.com/repos/chainHero/heroes-service/hooks","issue_events_url":"https://api.github.com/repos/chainHero/heroes-service/issues/events{/number}","events_url":"https://api.github.com/repos/chainHero/heroes-service/events","assignees_url":"https://api.github.com/repos/chainHero/heroes-service/assignees{/user}","branches_url":"https://api.github.com/repos/chainHero/heroes-service/branches{/branch}","tags_url":"https://api.github.com/repos/chainHero/heroes-service/tags","blobs_url":"https://api.github.com/repos/chainHero/heroes-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chainHero/heroes-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chainHero/heroes-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/chainHero/heroes-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chainHero/heroes-service/statuses/{sha}","languages_url":"https://api.github.com/repos/chainHero/heroes-service/languages","stargazers_url":"https://api.github.com/repos/chainHero/heroes-service/stargazers","contributors_url":"https://api.github.com/repos/chainHero/heroes-service/contributors","subscribers_url":"https://api.github.com/repos/chainHero/heroes-service/subscribers","subscription_url":"https://api.github.com/repos/chainHero/heroes-service/subscription","commits_url":"https://api.github.com/repos/chainHero/heroes-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/chainHero/heroes-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/chainHero/heroes-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/chainHero/heroes-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/chainHero/heroes-service/contents/{+path}","compare_url":"https://api.github.com/repos/chainHero/heroes-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chainHero/heroes-service/merges","archive_url":"https://api.github.com/repos/chainHero/heroes-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chainHero/heroes-service/downloads","issues_url":"https://api.github.com/repos/chainHero/heroes-service/issues{/number}","pulls_url":"https://api.github.com/repos/chainHero/heroes-service/pulls{/number}","milestones_url":"https://api.github.com/repos/chainHero/heroes-service/milestones{/number}","notifications_url":"https://api.github.com/repos/chainHero/heroes-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chainHero/heroes-service/labels{/name}","releases_url":"https://api.github.com/repos/chainHero/heroes-service/releases{/id}","deployments_url":"https://api.github.com/repos/chainHero/heroes-service/deployments","created_at":"2017-07-05T12:31:07Z","updated_at":"2018-06-21T01:05:51Z","pushed_at":"2018-06-20T21:39:07Z","git_url":"git://github.com/chainHero/heroes-service.git","ssh_url":"git@github.com:chainHero/heroes-service.git","clone_url":"https://github.com/chainHero/heroes-service.git","svn_url":"https://github.com/chainHero/heroes-service","homepage":"https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/","size":8802,"stargazers_count":106,"watchers_count":106,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":53,"open_issues":1,"watchers":106,"default_branch":"master"}},"base":{"label":"chainHero:master","ref":"master","sha":"77f7bb08b68bdb8938db074e49306a21d57e1f9b","user":{"login":"chainHero","id":29888859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5ODg4ODU5","avatar_url":"https://avatars2.githubusercontent.com/u/29888859?v=4","gravatar_id":"","url":"https://api.github.com/users/chainHero","html_url":"https://github.com/chainHero","followers_url":"https://api.github.com/users/chainHero/followers","following_url":"https://api.github.com/users/chainHero/following{/other_user}","gists_url":"https://api.github.com/users/chainHero/gists{/gist_id}","starred_url":"https://api.github.com/users/chainHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chainHero/subscriptions","organizations_url":"https://api.github.com/users/chainHero/orgs","repos_url":"https://api.github.com/users/chainHero/repos","events_url":"https://api.github.com/users/chainHero/events{/privacy}","received_events_url":"https://api.github.com/users/chainHero/received_events","type":"Organization","site_admin":false},"repo":{"id":96316970,"node_id":"MDEwOlJlcG9zaXRvcnk5NjMxNjk3MA==","name":"heroes-service","full_name":"chainHero/heroes-service","owner":{"login":"chainHero","id":29888859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5ODg4ODU5","avatar_url":"https://avatars2.githubusercontent.com/u/29888859?v=4","gravatar_id":"","url":"https://api.github.com/users/chainHero","html_url":"https://github.com/chainHero","followers_url":"https://api.github.com/users/chainHero/followers","following_url":"https://api.github.com/users/chainHero/following{/other_user}","gists_url":"https://api.github.com/users/chainHero/gists{/gist_id}","starred_url":"https://api.github.com/users/chainHero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chainHero/subscriptions","organizations_url":"https://api.github.com/users/chainHero/orgs","repos_url":"https://api.github.com/users/chainHero/repos","events_url":"https://api.github.com/users/chainHero/events{/privacy}","received_events_url":"https://api.github.com/users/chainHero/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chainHero/heroes-service","description":"Short tutorial to build a blockchain application in Go with Hyperledger Fabric","fork":false,"url":"https://api.github.com/repos/chainHero/heroes-service","forks_url":"https://api.github.com/repos/chainHero/heroes-service/forks","keys_url":"https://api.github.com/repos/chainHero/heroes-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chainHero/heroes-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chainHero/heroes-service/teams","hooks_url":"https://api.github.com/repos/chainHero/heroes-service/hooks","issue_events_url":"https://api.github.com/repos/chainHero/heroes-service/issues/events{/number}","events_url":"https://api.github.com/repos/chainHero/heroes-service/events","assignees_url":"https://api.github.com/repos/chainHero/heroes-service/assignees{/user}","branches_url":"https://api.github.com/repos/chainHero/heroes-service/branches{/branch}","tags_url":"https://api.github.com/repos/chainHero/heroes-service/tags","blobs_url":"https://api.github.com/repos/chainHero/heroes-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chainHero/heroes-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chainHero/heroes-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/chainHero/heroes-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chainHero/heroes-service/statuses/{sha}","languages_url":"https://api.github.com/repos/chainHero/heroes-service/languages","stargazers_url":"https://api.github.com/repos/chainHero/heroes-service/stargazers","contributors_url":"https://api.github.com/repos/chainHero/heroes-service/contributors","subscribers_url":"https://api.github.com/repos/chainHero/heroes-service/subscribers","subscription_url":"https://api.github.com/repos/chainHero/heroes-service/subscription","commits_url":"https://api.github.com/repos/chainHero/heroes-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/chainHero/heroes-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/chainHero/heroes-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/chainHero/heroes-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/chainHero/heroes-service/contents/{+path}","compare_url":"https://api.github.com/repos/chainHero/heroes-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chainHero/heroes-service/merges","archive_url":"https://api.github.com/repos/chainHero/heroes-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chainHero/heroes-service/downloads","issues_url":"https://api.github.com/repos/chainHero/heroes-service/issues{/number}","pulls_url":"https://api.github.com/repos/chainHero/heroes-service/pulls{/number}","milestones_url":"https://api.github.com/repos/chainHero/heroes-service/milestones{/number}","notifications_url":"https://api.github.com/repos/chainHero/heroes-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chainHero/heroes-service/labels{/name}","releases_url":"https://api.github.com/repos/chainHero/heroes-service/releases{/id}","deployments_url":"https://api.github.com/repos/chainHero/heroes-service/deployments","created_at":"2017-07-05T12:31:07Z","updated_at":"2018-06-21T01:05:51Z","pushed_at":"2018-06-20T21:39:07Z","git_url":"git://github.com/chainHero/heroes-service.git","ssh_url":"git@github.com:chainHero/heroes-service.git","clone_url":"https://github.com/chainHero/heroes-service.git","svn_url":"https://github.com/chainHero/heroes-service","homepage":"https://chainhero.io/2018/03/tutorial-build-blockchain-app-2/","size":8802,"stargazers_count":106,"watchers_count":106,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":53,"open_issues":1,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/18"},"html":{"href":"https://github.com/chainHero/heroes-service/pull/18"},"issue":{"href":"https://api.github.com/repos/chainHero/heroes-service/issues/18"},"comments":{"href":"https://api.github.com/repos/chainHero/heroes-service/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chainHero/heroes-service/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/chainHero/heroes-service/statuses/82a907aca6801ac70d657ef84065fac45f42d4b8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"antitoine"}}