{"action":"created","comment":{"url":"https://api.github.com/repos/line/armeria/pulls/comments/205037547","pull_request_review_id":140211599,"id":205037547,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTAzNzU0Nw==","diff_hunk":"@@ -0,0 +1,88 @@\n+/*\n+ * Copyright 2018 LINE Corporation\n+ *\n+ * LINE Corporation licenses this file to you under the Apache License,\n+ * version 2.0 (the \"License\"); you may not use this file except in compliance\n+ * with the License. You may obtain a copy of the License at:\n+ *\n+ *   https://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations\n+ * under the License.\n+ */\n+/*\n+ * Copyright 2014, gRPC Authors All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.linecorp.armeria.internal.grpc;\n+\n+import static org.assertj.core.api.Assertions.assertThat;\n+\n+import org.junit.Test;\n+\n+import com.linecorp.armeria.common.HttpStatus;\n+\n+import io.grpc.Status;\n+\n+public class GrpcStatusTest {\n+    @Test\n+    public void fromGrpcStatusCode() {","path":"grpc/src/test/java/com/linecorp/armeria/internal/grpc/GrpcStatusTest.java","position":44,"original_position":44,"commit_id":"7fb26be97a335707e9f1a81d1b8fb4c6f14b744c","original_commit_id":"7fb26be97a335707e9f1a81d1b8fb4c6f14b744c","user":{"login":"anuraaga","id":198344,"node_id":"MDQ6VXNlcjE5ODM0NA==","avatar_url":"https://avatars0.githubusercontent.com/u/198344?v=4","gravatar_id":"","url":"https://api.github.com/users/anuraaga","html_url":"https://github.com/anuraaga","followers_url":"https://api.github.com/users/anuraaga/followers","following_url":"https://api.github.com/users/anuraaga/following{/other_user}","gists_url":"https://api.github.com/users/anuraaga/gists{/gist_id}","starred_url":"https://api.github.com/users/anuraaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuraaga/subscriptions","organizations_url":"https://api.github.com/users/anuraaga/orgs","repos_url":"https://api.github.com/users/anuraaga/repos","events_url":"https://api.github.com/users/anuraaga/events{/privacy}","received_events_url":"https://api.github.com/users/anuraaga/received_events","type":"User","site_admin":false},"body":"The conversion seems to be implemented in a library called `gax-java`. I think it's too heavyweight to import for the conversion itself, but we may as well use here it to make this test automatic / exhaustive.\r\n\r\n```groovy\r\ntestCompile group: 'com.google.api', name: 'gax-grpc', version: '1.29.0'\r\n```\r\n\r\n```java\r\npublic class GrpcStatusTest {\r\n    @Test\r\n    public void fromGrpcStatusCode() {\r\n        for (Status.Code code : Status.Code.values()) {\r\n            assertThat(GrpcStatus.fromGrpcStatusCode(code).code())\r\n                    .as(\"gRPC code: {}\", code)\r\n                    .isEqualTo(GrpcStatusCode.of(code).getCode().getHttpStatusCode());\r\n        }\r\n    }\r\n}\r\n```","created_at":"2018-07-25T09:17:11Z","updated_at":"2018-07-25T09:17:35Z","html_url":"https://github.com/line/armeria/pull/1305#discussion_r205037547","pull_request_url":"https://api.github.com/repos/line/armeria/pulls/1305","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/comments/205037547"},"html":{"href":"https://github.com/line/armeria/pull/1305#discussion_r205037547"},"pull_request":{"href":"https://api.github.com/repos/line/armeria/pulls/1305"}}},"pull_request":{"url":"https://api.github.com/repos/line/armeria/pulls/1305","id":203754402,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzU0NDAy","html_url":"https://github.com/line/armeria/pull/1305","diff_url":"https://github.com/line/armeria/pull/1305.diff","patch_url":"https://github.com/line/armeria/pull/1305.patch","issue_url":"https://api.github.com/repos/line/armeria/issues/1305","number":1305,"state":"open","locked":false,"title":"issue 1252, GRPC exception status code to HTTP status code could be i…","user":{"login":"demongaorui","id":4316380,"node_id":"MDQ6VXNlcjQzMTYzODA=","avatar_url":"https://avatars2.githubusercontent.com/u/4316380?v=4","gravatar_id":"","url":"https://api.github.com/users/demongaorui","html_url":"https://github.com/demongaorui","followers_url":"https://api.github.com/users/demongaorui/followers","following_url":"https://api.github.com/users/demongaorui/following{/other_user}","gists_url":"https://api.github.com/users/demongaorui/gists{/gist_id}","starred_url":"https://api.github.com/users/demongaorui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demongaorui/subscriptions","organizations_url":"https://api.github.com/users/demongaorui/orgs","repos_url":"https://api.github.com/users/demongaorui/repos","events_url":"https://api.github.com/users/demongaorui/events{/privacy}","received_events_url":"https://api.github.com/users/demongaorui/received_events","type":"User","site_admin":false},"body":"…mproved\r\n\r\nfix: #1252 ","created_at":"2018-07-25T08:09:24Z","updated_at":"2018-07-25T09:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d1dd7caf2e93ae853cda47cb276e422ec29ee9db","assignee":null,"assignees":[],"requested_reviewers":[{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},{"login":"hyangtack","id":8417787,"node_id":"MDQ6VXNlcjg0MTc3ODc=","avatar_url":"https://avatars1.githubusercontent.com/u/8417787?v=4","gravatar_id":"","url":"https://api.github.com/users/hyangtack","html_url":"https://github.com/hyangtack","followers_url":"https://api.github.com/users/hyangtack/followers","following_url":"https://api.github.com/users/hyangtack/following{/other_user}","gists_url":"https://api.github.com/users/hyangtack/gists{/gist_id}","starred_url":"https://api.github.com/users/hyangtack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyangtack/subscriptions","organizations_url":"https://api.github.com/users/hyangtack/orgs","repos_url":"https://api.github.com/users/hyangtack/repos","events_url":"https://api.github.com/users/hyangtack/events{/privacy}","received_events_url":"https://api.github.com/users/hyangtack/received_events","type":"User","site_admin":false},{"login":"minwoox","id":25103250,"node_id":"MDQ6VXNlcjI1MTAzMjUw","avatar_url":"https://avatars2.githubusercontent.com/u/25103250?v=4","gravatar_id":"","url":"https://api.github.com/users/minwoox","html_url":"https://github.com/minwoox","followers_url":"https://api.github.com/users/minwoox/followers","following_url":"https://api.github.com/users/minwoox/following{/other_user}","gists_url":"https://api.github.com/users/minwoox/gists{/gist_id}","starred_url":"https://api.github.com/users/minwoox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minwoox/subscriptions","organizations_url":"https://api.github.com/users/minwoox/orgs","repos_url":"https://api.github.com/users/minwoox/repos","events_url":"https://api.github.com/users/minwoox/events{/privacy}","received_events_url":"https://api.github.com/users/minwoox/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":287189526,"node_id":"MDU6TGFiZWwyODcxODk1MjY=","url":"https://api.github.com/repos/line/armeria/labels/defect","name":"defect","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/line/armeria/pulls/1305/commits","review_comments_url":"https://api.github.com/repos/line/armeria/pulls/1305/comments","review_comment_url":"https://api.github.com/repos/line/armeria/pulls/comments{/number}","comments_url":"https://api.github.com/repos/line/armeria/issues/1305/comments","statuses_url":"https://api.github.com/repos/line/armeria/statuses/7fb26be97a335707e9f1a81d1b8fb4c6f14b744c","head":{"label":"demongaorui:issue_1252_grpc_unframed_response_status_code_mapping_improve","ref":"issue_1252_grpc_unframed_response_status_code_mapping_improve","sha":"7fb26be97a335707e9f1a81d1b8fb4c6f14b744c","user":{"login":"demongaorui","id":4316380,"node_id":"MDQ6VXNlcjQzMTYzODA=","avatar_url":"https://avatars2.githubusercontent.com/u/4316380?v=4","gravatar_id":"","url":"https://api.github.com/users/demongaorui","html_url":"https://github.com/demongaorui","followers_url":"https://api.github.com/users/demongaorui/followers","following_url":"https://api.github.com/users/demongaorui/following{/other_user}","gists_url":"https://api.github.com/users/demongaorui/gists{/gist_id}","starred_url":"https://api.github.com/users/demongaorui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demongaorui/subscriptions","organizations_url":"https://api.github.com/users/demongaorui/orgs","repos_url":"https://api.github.com/users/demongaorui/repos","events_url":"https://api.github.com/users/demongaorui/events{/privacy}","received_events_url":"https://api.github.com/users/demongaorui/received_events","type":"User","site_admin":false},"repo":{"id":74932300,"node_id":"MDEwOlJlcG9zaXRvcnk3NDkzMjMwMA==","name":"armeria","full_name":"demongaorui/armeria","owner":{"login":"demongaorui","id":4316380,"node_id":"MDQ6VXNlcjQzMTYzODA=","avatar_url":"https://avatars2.githubusercontent.com/u/4316380?v=4","gravatar_id":"","url":"https://api.github.com/users/demongaorui","html_url":"https://github.com/demongaorui","followers_url":"https://api.github.com/users/demongaorui/followers","following_url":"https://api.github.com/users/demongaorui/following{/other_user}","gists_url":"https://api.github.com/users/demongaorui/gists{/gist_id}","starred_url":"https://api.github.com/users/demongaorui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demongaorui/subscriptions","organizations_url":"https://api.github.com/users/demongaorui/orgs","repos_url":"https://api.github.com/users/demongaorui/repos","events_url":"https://api.github.com/users/demongaorui/events{/privacy}","received_events_url":"https://api.github.com/users/demongaorui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/demongaorui/armeria","description":"Asynchronous RPC/API client/server library built on top of Java 8, Netty 4.1, HTTP/2, and Thrift","fork":true,"url":"https://api.github.com/repos/demongaorui/armeria","forks_url":"https://api.github.com/repos/demongaorui/armeria/forks","keys_url":"https://api.github.com/repos/demongaorui/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/demongaorui/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/demongaorui/armeria/teams","hooks_url":"https://api.github.com/repos/demongaorui/armeria/hooks","issue_events_url":"https://api.github.com/repos/demongaorui/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/demongaorui/armeria/events","assignees_url":"https://api.github.com/repos/demongaorui/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/demongaorui/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/demongaorui/armeria/tags","blobs_url":"https://api.github.com/repos/demongaorui/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/demongaorui/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/demongaorui/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/demongaorui/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/demongaorui/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/demongaorui/armeria/languages","stargazers_url":"https://api.github.com/repos/demongaorui/armeria/stargazers","contributors_url":"https://api.github.com/repos/demongaorui/armeria/contributors","subscribers_url":"https://api.github.com/repos/demongaorui/armeria/subscribers","subscription_url":"https://api.github.com/repos/demongaorui/armeria/subscription","commits_url":"https://api.github.com/repos/demongaorui/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/demongaorui/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/demongaorui/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/demongaorui/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/demongaorui/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/demongaorui/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/demongaorui/armeria/merges","archive_url":"https://api.github.com/repos/demongaorui/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/demongaorui/armeria/downloads","issues_url":"https://api.github.com/repos/demongaorui/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/demongaorui/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/demongaorui/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/demongaorui/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/demongaorui/armeria/labels{/name}","releases_url":"https://api.github.com/repos/demongaorui/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/demongaorui/armeria/deployments","created_at":"2016-11-28T03:06:39Z","updated_at":"2016-11-28T03:06:42Z","pushed_at":"2018-07-25T09:08:09Z","git_url":"git://github.com/demongaorui/armeria.git","ssh_url":"git@github.com:demongaorui/armeria.git","clone_url":"https://github.com/demongaorui/armeria.git","svn_url":"https://github.com/demongaorui/armeria","homepage":"http://line.github.io/armeria/","size":53477,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"line:master","ref":"master","sha":"f894e91f030ba7a7d4ea25b2ff6b8d7e2137785c","user":{"login":"line","id":13128444,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTI4NDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"repo":{"id":46251204,"node_id":"MDEwOlJlcG9zaXRvcnk0NjI1MTIwNA==","name":"armeria","full_name":"line/armeria","owner":{"login":"line","id":13128444,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTI4NDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/13128444?v=4","gravatar_id":"","url":"https://api.github.com/users/line","html_url":"https://github.com/line","followers_url":"https://api.github.com/users/line/followers","following_url":"https://api.github.com/users/line/following{/other_user}","gists_url":"https://api.github.com/users/line/gists{/gist_id}","starred_url":"https://api.github.com/users/line/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line/subscriptions","organizations_url":"https://api.github.com/users/line/orgs","repos_url":"https://api.github.com/users/line/repos","events_url":"https://api.github.com/users/line/events{/privacy}","received_events_url":"https://api.github.com/users/line/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/line/armeria","description":"Asynchronous RPC/REST library built on top of Java 8, Netty, HTTP/2, Thrift and gRPC","fork":false,"url":"https://api.github.com/repos/line/armeria","forks_url":"https://api.github.com/repos/line/armeria/forks","keys_url":"https://api.github.com/repos/line/armeria/keys{/key_id}","collaborators_url":"https://api.github.com/repos/line/armeria/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/line/armeria/teams","hooks_url":"https://api.github.com/repos/line/armeria/hooks","issue_events_url":"https://api.github.com/repos/line/armeria/issues/events{/number}","events_url":"https://api.github.com/repos/line/armeria/events","assignees_url":"https://api.github.com/repos/line/armeria/assignees{/user}","branches_url":"https://api.github.com/repos/line/armeria/branches{/branch}","tags_url":"https://api.github.com/repos/line/armeria/tags","blobs_url":"https://api.github.com/repos/line/armeria/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/line/armeria/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/line/armeria/git/refs{/sha}","trees_url":"https://api.github.com/repos/line/armeria/git/trees{/sha}","statuses_url":"https://api.github.com/repos/line/armeria/statuses/{sha}","languages_url":"https://api.github.com/repos/line/armeria/languages","stargazers_url":"https://api.github.com/repos/line/armeria/stargazers","contributors_url":"https://api.github.com/repos/line/armeria/contributors","subscribers_url":"https://api.github.com/repos/line/armeria/subscribers","subscription_url":"https://api.github.com/repos/line/armeria/subscription","commits_url":"https://api.github.com/repos/line/armeria/commits{/sha}","git_commits_url":"https://api.github.com/repos/line/armeria/git/commits{/sha}","comments_url":"https://api.github.com/repos/line/armeria/comments{/number}","issue_comment_url":"https://api.github.com/repos/line/armeria/issues/comments{/number}","contents_url":"https://api.github.com/repos/line/armeria/contents/{+path}","compare_url":"https://api.github.com/repos/line/armeria/compare/{base}...{head}","merges_url":"https://api.github.com/repos/line/armeria/merges","archive_url":"https://api.github.com/repos/line/armeria/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/line/armeria/downloads","issues_url":"https://api.github.com/repos/line/armeria/issues{/number}","pulls_url":"https://api.github.com/repos/line/armeria/pulls{/number}","milestones_url":"https://api.github.com/repos/line/armeria/milestones{/number}","notifications_url":"https://api.github.com/repos/line/armeria/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/line/armeria/labels{/name}","releases_url":"https://api.github.com/repos/line/armeria/releases{/id}","deployments_url":"https://api.github.com/repos/line/armeria/deployments","created_at":"2015-11-16T04:04:01Z","updated_at":"2018-07-25T08:06:42Z","pushed_at":"2018-07-25T09:15:53Z","git_url":"git://github.com/line/armeria.git","ssh_url":"git@github.com:line/armeria.git","clone_url":"https://github.com/line/armeria.git","svn_url":"https://github.com/line/armeria","homepage":"https://line.github.io/armeria/","size":57088,"stargazers_count":1348,"watchers_count":1348,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":295,"mirror_url":null,"archived":false,"open_issues_count":103,"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":295,"open_issues":103,"watchers":1348,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/line/armeria/pulls/1305"},"html":{"href":"https://github.com/line/armeria/pull/1305"},"issue":{"href":"https://api.github.com/repos/line/armeria/issues/1305"},"comments":{"href":"https://api.github.com/repos/line/armeria/issues/1305/comments"},"review_comments":{"href":"https://api.github.com/repos/line/armeria/pulls/1305/comments"},"review_comment":{"href":"https://api.github.com/repos/line/armeria/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/line/armeria/pulls/1305/commits"},"statuses":{"href":"https://api.github.com/repos/line/armeria/statuses/7fb26be97a335707e9f1a81d1b8fb4c6f14b744c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"anuraaga"}}