{"action":"created","comment":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/comments/181615866","pull_request_review_id":112272506,"id":181615866,"diff_hunk":"@@ -0,0 +1,51 @@\n+load(\"@io_bazel_rules_go//go:def.bzl\", \"go_library\")\n+load(\"@io_bazel_rules_go//proto:def.bzl\", \"go_proto_library\")\n+\n+package(default_visibility = [\"//visibility:public\"])\n+\n+proto_library(\n+    name = \"examplepb_proto\",\n+    srcs = [\n+        \"a_bit_of_everything.proto\",\n+        \"echo_service.proto\",\n+        \"flow_combination.proto\",\n+        \"stream.proto\",\n+        \"wrappers.proto\",\n+    ],\n+    deps = [\n+        \"//examples/sub:sub_proto\",\n+        \"//examples/sub2:sub2_proto\",\n+        \"//protoc-gen-swagger/options:options_proto\",\n+        \"@com_github_googleapis_googleapis//google/api:api_proto\",","path":"examples/examplepb/BUILD.bazel","position":19,"original_position":19,"commit_id":"8e88af147d444e60a0021b322aa071b2e59a6a0a","original_commit_id":"e107639695c87f1314a56c72cce56c70bcadae24","user":{"login":"yugui","id":8161,"avatar_url":"https://avatars1.githubusercontent.com/u/8161?v=4","gravatar_id":"","url":"https://api.github.com/users/yugui","html_url":"https://github.com/yugui","followers_url":"https://api.github.com/users/yugui/followers","following_url":"https://api.github.com/users/yugui/following{/other_user}","gists_url":"https://api.github.com/users/yugui/gists{/gist_id}","starred_url":"https://api.github.com/users/yugui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugui/subscriptions","organizations_url":"https://api.github.com/users/yugui/orgs","repos_url":"https://api.github.com/users/yugui/repos","events_url":"https://api.github.com/users/yugui/events{/privacy}","received_events_url":"https://api.github.com/users/yugui/received_events","type":"User","site_admin":false},"body":"Sorry, I have no idea. Let me merge this PR as it is.","created_at":"2018-04-16T03:36:46Z","updated_at":"2018-04-16T03:36:46Z","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599#discussion_r181615866","pull_request_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/comments/181615866"},"html":{"href":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599#discussion_r181615866"},"pull_request":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599"}},"in_reply_to_id":181589885},"pull_request":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599","id":181666549,"html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599","diff_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599.diff","patch_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599.patch","issue_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599","number":599,"state":"open","locked":false,"title":"Added Bazel support","user":{"login":"f0rmiga","id":3149049,"avatar_url":"https://avatars0.githubusercontent.com/u/3149049?v=4","gravatar_id":"","url":"https://api.github.com/users/f0rmiga","html_url":"https://github.com/f0rmiga","followers_url":"https://api.github.com/users/f0rmiga/followers","following_url":"https://api.github.com/users/f0rmiga/following{/other_user}","gists_url":"https://api.github.com/users/f0rmiga/gists{/gist_id}","starred_url":"https://api.github.com/users/f0rmiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0rmiga/subscriptions","organizations_url":"https://api.github.com/users/f0rmiga/orgs","repos_url":"https://api.github.com/users/f0rmiga/repos","events_url":"https://api.github.com/users/f0rmiga/events{/privacy}","received_events_url":"https://api.github.com/users/f0rmiga/received_events","type":"User","site_admin":false},"body":"Sorry for the size of the PR. I would be up for a peer review if wanted.\r\n\r\nAlmost every target was generated by Gazelle.\r\nGazelle tried to index `//google/api/...` because of the third party protos being used. To solve that I excluded the `third_party` directory from Gazelle and created the `repositories.bzl` that at this point:\r\n    - Downloads the `googleapis` repository.\r\n    - Adds a `BUILD.bazel` file under `//google/api/` with targets for the protos.\r\n\r\nGazelle still tries to remove `\"@com_github_googleapis_googleapis//google/api:api_proto\"` and `\"@com_github_googleapis_googleapis//google/api:go_default_library\"` in favour of `//google/api/...`, which is wrong.\r\n\r\nTo check what Gazelle reports in check mode, run `bazel run //:gazelle_diff`.\r\n\r\nThe `third_party` directory is not being used by any Bazel target at all. If the grpc-gateway team decides to move completely to Bazel, this directory can be removed.\r\n\r\nEvery `.pb.go` and `.pb.gw.go` can also be removed if this repo moves completely to Bazel. In order to have the swagger generator to work with Bazel, I would need to write a specific rule for that.\r\n\r\nTo compile everything:\r\n```\r\n$ bazel build //...\r\n```\r\n\r\nTo test everything:\r\n```\r\n$ bazel test //...\r\n```","created_at":"2018-04-14T20:49:06Z","updated_at":"2018-04-16T03:36:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b0cc8be18a4f586233cbb0b9ac20f66f7ac6542","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":816045899,"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599/commits","review_comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599/comments","review_comment_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599/comments","statuses_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/statuses/8e88af147d444e60a0021b322aa071b2e59a6a0a","head":{"label":"f0rmiga:add-bazel-support","ref":"add-bazel-support","sha":"8e88af147d444e60a0021b322aa071b2e59a6a0a","user":{"login":"f0rmiga","id":3149049,"avatar_url":"https://avatars0.githubusercontent.com/u/3149049?v=4","gravatar_id":"","url":"https://api.github.com/users/f0rmiga","html_url":"https://github.com/f0rmiga","followers_url":"https://api.github.com/users/f0rmiga/followers","following_url":"https://api.github.com/users/f0rmiga/following{/other_user}","gists_url":"https://api.github.com/users/f0rmiga/gists{/gist_id}","starred_url":"https://api.github.com/users/f0rmiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0rmiga/subscriptions","organizations_url":"https://api.github.com/users/f0rmiga/orgs","repos_url":"https://api.github.com/users/f0rmiga/repos","events_url":"https://api.github.com/users/f0rmiga/events{/privacy}","received_events_url":"https://api.github.com/users/f0rmiga/received_events","type":"User","site_admin":false},"repo":{"id":129551884,"name":"grpc-gateway","full_name":"f0rmiga/grpc-gateway","owner":{"login":"f0rmiga","id":3149049,"avatar_url":"https://avatars0.githubusercontent.com/u/3149049?v=4","gravatar_id":"","url":"https://api.github.com/users/f0rmiga","html_url":"https://github.com/f0rmiga","followers_url":"https://api.github.com/users/f0rmiga/followers","following_url":"https://api.github.com/users/f0rmiga/following{/other_user}","gists_url":"https://api.github.com/users/f0rmiga/gists{/gist_id}","starred_url":"https://api.github.com/users/f0rmiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0rmiga/subscriptions","organizations_url":"https://api.github.com/users/f0rmiga/orgs","repos_url":"https://api.github.com/users/f0rmiga/repos","events_url":"https://api.github.com/users/f0rmiga/events{/privacy}","received_events_url":"https://api.github.com/users/f0rmiga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/f0rmiga/grpc-gateway","description":"gRPC to JSON proxy generator following the gRPC HTTP spec","fork":true,"url":"https://api.github.com/repos/f0rmiga/grpc-gateway","forks_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/forks","keys_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/teams","hooks_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/hooks","issue_events_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/events","assignees_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/tags","blobs_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/languages","stargazers_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/stargazers","contributors_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/contributors","subscribers_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/subscribers","subscription_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/subscription","commits_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/merges","archive_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/downloads","issues_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/labels{/name}","releases_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/releases{/id}","deployments_url":"https://api.github.com/repos/f0rmiga/grpc-gateway/deployments","created_at":"2018-04-14T20:25:32Z","updated_at":"2018-04-15T23:19:14Z","pushed_at":"2018-04-16T03:29:40Z","git_url":"git://github.com/f0rmiga/grpc-gateway.git","ssh_url":"git@github.com:f0rmiga/grpc-gateway.git","clone_url":"https://github.com/f0rmiga/grpc-gateway.git","svn_url":"https://github.com/f0rmiga/grpc-gateway","homepage":"","size":1311,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc-ecosystem:master","ref":"master","sha":"7a2a43655ccd9a488d423ea41a3fc723af103eda","user":{"login":"grpc-ecosystem","id":19352526,"avatar_url":"https://avatars3.githubusercontent.com/u/19352526?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc-ecosystem","html_url":"https://github.com/grpc-ecosystem","followers_url":"https://api.github.com/users/grpc-ecosystem/followers","following_url":"https://api.github.com/users/grpc-ecosystem/following{/other_user}","gists_url":"https://api.github.com/users/grpc-ecosystem/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc-ecosystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc-ecosystem/subscriptions","organizations_url":"https://api.github.com/users/grpc-ecosystem/orgs","repos_url":"https://api.github.com/users/grpc-ecosystem/repos","events_url":"https://api.github.com/users/grpc-ecosystem/events{/privacy}","received_events_url":"https://api.github.com/users/grpc-ecosystem/received_events","type":"Organization","site_admin":false},"repo":{"id":33352201,"name":"grpc-gateway","full_name":"grpc-ecosystem/grpc-gateway","owner":{"login":"grpc-ecosystem","id":19352526,"avatar_url":"https://avatars3.githubusercontent.com/u/19352526?v=4","gravatar_id":"","url":"https://api.github.com/users/grpc-ecosystem","html_url":"https://github.com/grpc-ecosystem","followers_url":"https://api.github.com/users/grpc-ecosystem/followers","following_url":"https://api.github.com/users/grpc-ecosystem/following{/other_user}","gists_url":"https://api.github.com/users/grpc-ecosystem/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc-ecosystem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc-ecosystem/subscriptions","organizations_url":"https://api.github.com/users/grpc-ecosystem/orgs","repos_url":"https://api.github.com/users/grpc-ecosystem/repos","events_url":"https://api.github.com/users/grpc-ecosystem/events{/privacy}","received_events_url":"https://api.github.com/users/grpc-ecosystem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc-ecosystem/grpc-gateway","description":"gRPC to JSON proxy generator following the gRPC HTTP spec","fork":false,"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway","forks_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/forks","keys_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/teams","hooks_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/hooks","issue_events_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/events","assignees_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/tags","blobs_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/languages","stargazers_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/stargazers","contributors_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/contributors","subscribers_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/subscribers","subscription_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/subscription","commits_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/merges","archive_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/downloads","issues_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/labels{/name}","releases_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/releases{/id}","deployments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/deployments","created_at":"2015-04-03T07:25:13Z","updated_at":"2018-04-16T03:22:32Z","pushed_at":"2018-04-16T03:29:42Z","git_url":"git://github.com/grpc-ecosystem/grpc-gateway.git","ssh_url":"git@github.com:grpc-ecosystem/grpc-gateway.git","clone_url":"https://github.com/grpc-ecosystem/grpc-gateway.git","svn_url":"https://github.com/grpc-ecosystem/grpc-gateway","homepage":"","size":1304,"stargazers_count":3556,"watchers_count":3556,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":423,"mirror_url":null,"archived":false,"open_issues_count":100,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":423,"open_issues":100,"watchers":3556,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599"},"html":{"href":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599"},"issue":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599"},"comments":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599/commits"},"statuses":{"href":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/statuses/8e88af147d444e60a0021b322aa071b2e59a6a0a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yugui"}}