{"action":"created","comment":{"url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/comments/189554589","pull_request_review_id":121754396,"id":189554589,"diff_hunk":"@@ -0,0 +1,96 @@\n+package istio\n+\n+import (\n+\t\"istio.io/istio/pilot/pkg/model\"\n+\trouting \"istio.io/api/routing/v1alpha1\"\n+\t\"github.com/hidevopsio/hiboot/pkg/log\"\n+\tgoogle_protobuf1 \"github.com/golang/protobuf/ptypes/duration\"\n+)\n+\n+const (\n+\tRouterType    = \"route-rule\"\n+\tRouterVersion = \"v1alpha2\"\n+\tRouterGroup   = \"config.istio.io\"\n+\tRouterDomain  = \"cluster\"\n+)\n+\n+type RouterRule struct {\n+\tClient\n+\tRoute          []*routing.DestinationWeight `json:\"route\"`\n+\tHttpFault      *routing.HTTPFaultInjection  `json:\"http_fault\"`\n+\tHttpReqTimeout *routing.HTTPTimeout         `json:\"http_req_timeout\"`\n+\tTimeout        int64                        `json:\"timeout\"`\n+\tPercent        float32                      `json:\"percent\"`\n+\tFixedDelay     int64                        `json:\"fixed_delay\"`\n+}\n+//Obtain  config\n+func (router *RouterRule) GetConfig() (model.Config, error) {\n+\troute := &routing.RouteRule{","path":"pkg/orch/istio/routerule.go","position":28,"original_position":28,"commit_id":"9399b031d2ed6328e2465ce01e2138af1a5d5285","original_commit_id":"9399b031d2ed6328e2465ce01e2138af1a5d5285","user":{"login":"john-deng","id":6748475,"avatar_url":"https://avatars3.githubusercontent.com/u/6748475?v=4","gravatar_id":"","url":"https://api.github.com/users/john-deng","html_url":"https://github.com/john-deng","followers_url":"https://api.github.com/users/john-deng/followers","following_url":"https://api.github.com/users/john-deng/following{/other_user}","gists_url":"https://api.github.com/users/john-deng/gists{/gist_id}","starred_url":"https://api.github.com/users/john-deng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-deng/subscriptions","organizations_url":"https://api.github.com/users/john-deng/orgs","repos_url":"https://api.github.com/users/john-deng/repos","events_url":"https://api.github.com/users/john-deng/events{/privacy}","received_events_url":"https://api.github.com/users/john-deng/received_events","type":"User","site_admin":false},"body":"routerule := &routing.RouteRule{","created_at":"2018-05-21T10:43:07Z","updated_at":"2018-05-21T10:43:07Z","html_url":"https://github.com/hidevopsio/hicicd/pull/6#discussion_r189554589","pull_request_url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/comments/189554589"},"html":{"href":"https://github.com/hidevopsio/hicicd/pull/6#discussion_r189554589"},"pull_request":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6","id":189338322,"html_url":"https://github.com/hidevopsio/hicicd/pull/6","diff_url":"https://github.com/hidevopsio/hicicd/pull/6.diff","patch_url":"https://github.com/hidevopsio/hicicd/pull/6.patch","issue_url":"https://api.github.com/repos/hidevopsio/hicicd/issues/6","number":6,"state":"open","locked":false,"title":"add route rule","user":{"login":"john-deng","id":6748475,"avatar_url":"https://avatars3.githubusercontent.com/u/6748475?v=4","gravatar_id":"","url":"https://api.github.com/users/john-deng","html_url":"https://github.com/john-deng","followers_url":"https://api.github.com/users/john-deng/followers","following_url":"https://api.github.com/users/john-deng/following{/other_user}","gists_url":"https://api.github.com/users/john-deng/gists{/gist_id}","starred_url":"https://api.github.com/users/john-deng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/john-deng/subscriptions","organizations_url":"https://api.github.com/users/john-deng/orgs","repos_url":"https://api.github.com/users/john-deng/repos","events_url":"https://api.github.com/users/john-deng/events{/privacy}","received_events_url":"https://api.github.com/users/john-deng/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-21T10:17:51Z","updated_at":"2018-05-21T10:43:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5017bdea17accf14b9058ca47c082533306c8055","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6/commits","review_comments_url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6/comments","review_comment_url":"https://api.github.com/repos/hidevopsio/hicicd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hidevopsio/hicicd/issues/6/comments","statuses_url":"https://api.github.com/repos/hidevopsio/hicicd/statuses/9399b031d2ed6328e2465ce01e2138af1a5d5285","head":{"label":"ClareChu:routerule","ref":"routerule","sha":"9399b031d2ed6328e2465ce01e2138af1a5d5285","user":{"login":"ClareChu","id":28973013,"avatar_url":"https://avatars3.githubusercontent.com/u/28973013?v=4","gravatar_id":"","url":"https://api.github.com/users/ClareChu","html_url":"https://github.com/ClareChu","followers_url":"https://api.github.com/users/ClareChu/followers","following_url":"https://api.github.com/users/ClareChu/following{/other_user}","gists_url":"https://api.github.com/users/ClareChu/gists{/gist_id}","starred_url":"https://api.github.com/users/ClareChu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClareChu/subscriptions","organizations_url":"https://api.github.com/users/ClareChu/orgs","repos_url":"https://api.github.com/users/ClareChu/repos","events_url":"https://api.github.com/users/ClareChu/events{/privacy}","received_events_url":"https://api.github.com/users/ClareChu/received_events","type":"User","site_admin":false},"repo":{"id":130335352,"name":"hicicd","full_name":"ClareChu/hicicd","owner":{"login":"ClareChu","id":28973013,"avatar_url":"https://avatars3.githubusercontent.com/u/28973013?v=4","gravatar_id":"","url":"https://api.github.com/users/ClareChu","html_url":"https://github.com/ClareChu","followers_url":"https://api.github.com/users/ClareChu/followers","following_url":"https://api.github.com/users/ClareChu/following{/other_user}","gists_url":"https://api.github.com/users/ClareChu/gists{/gist_id}","starred_url":"https://api.github.com/users/ClareChu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClareChu/subscriptions","organizations_url":"https://api.github.com/users/ClareChu/orgs","repos_url":"https://api.github.com/users/ClareChu/repos","events_url":"https://api.github.com/users/ClareChu/events{/privacy}","received_events_url":"https://api.github.com/users/ClareChu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ClareChu/hicicd","description":"Microservices Continuously Integration and Continuously Delivery Tool","fork":true,"url":"https://api.github.com/repos/ClareChu/hicicd","forks_url":"https://api.github.com/repos/ClareChu/hicicd/forks","keys_url":"https://api.github.com/repos/ClareChu/hicicd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClareChu/hicicd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClareChu/hicicd/teams","hooks_url":"https://api.github.com/repos/ClareChu/hicicd/hooks","issue_events_url":"https://api.github.com/repos/ClareChu/hicicd/issues/events{/number}","events_url":"https://api.github.com/repos/ClareChu/hicicd/events","assignees_url":"https://api.github.com/repos/ClareChu/hicicd/assignees{/user}","branches_url":"https://api.github.com/repos/ClareChu/hicicd/branches{/branch}","tags_url":"https://api.github.com/repos/ClareChu/hicicd/tags","blobs_url":"https://api.github.com/repos/ClareChu/hicicd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClareChu/hicicd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClareChu/hicicd/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClareChu/hicicd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClareChu/hicicd/statuses/{sha}","languages_url":"https://api.github.com/repos/ClareChu/hicicd/languages","stargazers_url":"https://api.github.com/repos/ClareChu/hicicd/stargazers","contributors_url":"https://api.github.com/repos/ClareChu/hicicd/contributors","subscribers_url":"https://api.github.com/repos/ClareChu/hicicd/subscribers","subscription_url":"https://api.github.com/repos/ClareChu/hicicd/subscription","commits_url":"https://api.github.com/repos/ClareChu/hicicd/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClareChu/hicicd/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClareChu/hicicd/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClareChu/hicicd/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClareChu/hicicd/contents/{+path}","compare_url":"https://api.github.com/repos/ClareChu/hicicd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClareChu/hicicd/merges","archive_url":"https://api.github.com/repos/ClareChu/hicicd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClareChu/hicicd/downloads","issues_url":"https://api.github.com/repos/ClareChu/hicicd/issues{/number}","pulls_url":"https://api.github.com/repos/ClareChu/hicicd/pulls{/number}","milestones_url":"https://api.github.com/repos/ClareChu/hicicd/milestones{/number}","notifications_url":"https://api.github.com/repos/ClareChu/hicicd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClareChu/hicicd/labels{/name}","releases_url":"https://api.github.com/repos/ClareChu/hicicd/releases{/id}","deployments_url":"https://api.github.com/repos/ClareChu/hicicd/deployments","created_at":"2018-04-20T08:45:00Z","updated_at":"2018-05-21T09:22:48Z","pushed_at":"2018-05-21T10:09:23Z","git_url":"git://github.com/ClareChu/hicicd.git","ssh_url":"git@github.com:ClareChu/hicicd.git","clone_url":"https://github.com/ClareChu/hicicd.git","svn_url":"https://github.com/ClareChu/hicicd","homepage":null,"size":14088,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hidevopsio:master","ref":"master","sha":"8591d80167518602e7344cae427e29359185c12c","user":{"login":"hidevopsio","id":37439955,"avatar_url":"https://avatars3.githubusercontent.com/u/37439955?v=4","gravatar_id":"","url":"https://api.github.com/users/hidevopsio","html_url":"https://github.com/hidevopsio","followers_url":"https://api.github.com/users/hidevopsio/followers","following_url":"https://api.github.com/users/hidevopsio/following{/other_user}","gists_url":"https://api.github.com/users/hidevopsio/gists{/gist_id}","starred_url":"https://api.github.com/users/hidevopsio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hidevopsio/subscriptions","organizations_url":"https://api.github.com/users/hidevopsio/orgs","repos_url":"https://api.github.com/users/hidevopsio/repos","events_url":"https://api.github.com/users/hidevopsio/events{/privacy}","received_events_url":"https://api.github.com/users/hidevopsio/received_events","type":"Organization","site_admin":false},"repo":{"id":130312120,"name":"hicicd","full_name":"hidevopsio/hicicd","owner":{"login":"hidevopsio","id":37439955,"avatar_url":"https://avatars3.githubusercontent.com/u/37439955?v=4","gravatar_id":"","url":"https://api.github.com/users/hidevopsio","html_url":"https://github.com/hidevopsio","followers_url":"https://api.github.com/users/hidevopsio/followers","following_url":"https://api.github.com/users/hidevopsio/following{/other_user}","gists_url":"https://api.github.com/users/hidevopsio/gists{/gist_id}","starred_url":"https://api.github.com/users/hidevopsio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hidevopsio/subscriptions","organizations_url":"https://api.github.com/users/hidevopsio/orgs","repos_url":"https://api.github.com/users/hidevopsio/repos","events_url":"https://api.github.com/users/hidevopsio/events{/privacy}","received_events_url":"https://api.github.com/users/hidevopsio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hidevopsio/hicicd","description":"Microservices Continuously Integration and Continuously Delivery Tool","fork":false,"url":"https://api.github.com/repos/hidevopsio/hicicd","forks_url":"https://api.github.com/repos/hidevopsio/hicicd/forks","keys_url":"https://api.github.com/repos/hidevopsio/hicicd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hidevopsio/hicicd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hidevopsio/hicicd/teams","hooks_url":"https://api.github.com/repos/hidevopsio/hicicd/hooks","issue_events_url":"https://api.github.com/repos/hidevopsio/hicicd/issues/events{/number}","events_url":"https://api.github.com/repos/hidevopsio/hicicd/events","assignees_url":"https://api.github.com/repos/hidevopsio/hicicd/assignees{/user}","branches_url":"https://api.github.com/repos/hidevopsio/hicicd/branches{/branch}","tags_url":"https://api.github.com/repos/hidevopsio/hicicd/tags","blobs_url":"https://api.github.com/repos/hidevopsio/hicicd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hidevopsio/hicicd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hidevopsio/hicicd/git/refs{/sha}","trees_url":"https://api.github.com/repos/hidevopsio/hicicd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hidevopsio/hicicd/statuses/{sha}","languages_url":"https://api.github.com/repos/hidevopsio/hicicd/languages","stargazers_url":"https://api.github.com/repos/hidevopsio/hicicd/stargazers","contributors_url":"https://api.github.com/repos/hidevopsio/hicicd/contributors","subscribers_url":"https://api.github.com/repos/hidevopsio/hicicd/subscribers","subscription_url":"https://api.github.com/repos/hidevopsio/hicicd/subscription","commits_url":"https://api.github.com/repos/hidevopsio/hicicd/commits{/sha}","git_commits_url":"https://api.github.com/repos/hidevopsio/hicicd/git/commits{/sha}","comments_url":"https://api.github.com/repos/hidevopsio/hicicd/comments{/number}","issue_comment_url":"https://api.github.com/repos/hidevopsio/hicicd/issues/comments{/number}","contents_url":"https://api.github.com/repos/hidevopsio/hicicd/contents/{+path}","compare_url":"https://api.github.com/repos/hidevopsio/hicicd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hidevopsio/hicicd/merges","archive_url":"https://api.github.com/repos/hidevopsio/hicicd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hidevopsio/hicicd/downloads","issues_url":"https://api.github.com/repos/hidevopsio/hicicd/issues{/number}","pulls_url":"https://api.github.com/repos/hidevopsio/hicicd/pulls{/number}","milestones_url":"https://api.github.com/repos/hidevopsio/hicicd/milestones{/number}","notifications_url":"https://api.github.com/repos/hidevopsio/hicicd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hidevopsio/hicicd/labels{/name}","releases_url":"https://api.github.com/repos/hidevopsio/hicicd/releases{/id}","deployments_url":"https://api.github.com/repos/hidevopsio/hicicd/deployments","created_at":"2018-04-20T05:14:21Z","updated_at":"2018-05-09T10:50:57Z","pushed_at":"2018-05-21T10:17:51Z","git_url":"git://github.com/hidevopsio/hicicd.git","ssh_url":"git@github.com:hidevopsio/hicicd.git","clone_url":"https://github.com/hidevopsio/hicicd.git","svn_url":"https://github.com/hidevopsio/hicicd","homepage":null,"size":14070,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"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"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6"},"html":{"href":"https://github.com/hidevopsio/hicicd/pull/6"},"issue":{"href":"https://api.github.com/repos/hidevopsio/hicicd/issues/6"},"comments":{"href":"https://api.github.com/repos/hidevopsio/hicicd/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hidevopsio/hicicd/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/hidevopsio/hicicd/statuses/9399b031d2ed6328e2465ce01e2138af1a5d5285"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"john-deng"}}