{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments/186690412","pull_request_review_id":118316879,"id":186690412,"diff_hunk":"@@ -200,6 +208,23 @@ func statusIPs(st []Status, src func(*Status) []string) []string {\n \treturn nil\n }\n \n+// MapPort returns the mapped port if available, or the host port\n+// listening on.\n+// TODO: error checking, is Statuses[0] always the current status ?\n+func MapPort(t Task, hostport int) (int, string) {\n+\tni := t.Statuses[0].ContainerStatus.NetworkInfos\n+\tfor n := range ni {\n+\t\tif ni[n].PortMappings != nil {","path":"records/state/state.go","position":34,"original_position":34,"commit_id":"99f034c7b5e3cadc7b9a874788bd74aaa8eacd6b","original_commit_id":"99f034c7b5e3cadc7b9a874788bd74aaa8eacd6b","user":{"login":"vixns","id":727336,"avatar_url":"https://avatars2.githubusercontent.com/u/727336?v=4","gravatar_id":"","url":"https://api.github.com/users/vixns","html_url":"https://github.com/vixns","followers_url":"https://api.github.com/users/vixns/followers","following_url":"https://api.github.com/users/vixns/following{/other_user}","gists_url":"https://api.github.com/users/vixns/gists{/gist_id}","starred_url":"https://api.github.com/users/vixns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vixns/subscriptions","organizations_url":"https://api.github.com/users/vixns/orgs","repos_url":"https://api.github.com/users/vixns/repos","events_url":"https://api.github.com/users/vixns/events{/privacy}","received_events_url":"https://api.github.com/users/vixns/received_events","type":"User","site_admin":false},"body":"it isn't, I will remove it","created_at":"2018-05-08T11:03:29Z","updated_at":"2018-05-08T11:03:29Z","html_url":"https://github.com/mesosphere/mesos-dns/pull/519#discussion_r186690412","pull_request_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments/186690412"},"html":{"href":"https://github.com/mesosphere/mesos-dns/pull/519#discussion_r186690412"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519"}},"in_reply_to_id":186687227},"pull_request":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519","id":186589613,"html_url":"https://github.com/mesosphere/mesos-dns/pull/519","diff_url":"https://github.com/mesosphere/mesos-dns/pull/519.diff","patch_url":"https://github.com/mesosphere/mesos-dns/pull/519.patch","issue_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/519","number":519,"state":"open","locked":false,"title":"use container ports in tasks SRV records","user":{"login":"vixns","id":727336,"avatar_url":"https://avatars2.githubusercontent.com/u/727336?v=4","gravatar_id":"","url":"https://api.github.com/users/vixns","html_url":"https://github.com/vixns","followers_url":"https://api.github.com/users/vixns/followers","following_url":"https://api.github.com/users/vixns/following{/other_user}","gists_url":"https://api.github.com/users/vixns/gists{/gist_id}","starred_url":"https://api.github.com/users/vixns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vixns/subscriptions","organizations_url":"https://api.github.com/users/vixns/orgs","repos_url":"https://api.github.com/users/vixns/repos","events_url":"https://api.github.com/users/vixns/events{/privacy}","received_events_url":"https://api.github.com/users/vixns/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-08T10:23:13Z","updated_at":"2018-05-08T11:03:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"989ad75f0cd062ab74b130d039b094559b4c6b88","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519/commits","review_comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519/comments","review_comment_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/519/comments","statuses_url":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/99f034c7b5e3cadc7b9a874788bd74aaa8eacd6b","head":{"label":"vixns:container_port","ref":"container_port","sha":"99f034c7b5e3cadc7b9a874788bd74aaa8eacd6b","user":{"login":"vixns","id":727336,"avatar_url":"https://avatars2.githubusercontent.com/u/727336?v=4","gravatar_id":"","url":"https://api.github.com/users/vixns","html_url":"https://github.com/vixns","followers_url":"https://api.github.com/users/vixns/followers","following_url":"https://api.github.com/users/vixns/following{/other_user}","gists_url":"https://api.github.com/users/vixns/gists{/gist_id}","starred_url":"https://api.github.com/users/vixns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vixns/subscriptions","organizations_url":"https://api.github.com/users/vixns/orgs","repos_url":"https://api.github.com/users/vixns/repos","events_url":"https://api.github.com/users/vixns/events{/privacy}","received_events_url":"https://api.github.com/users/vixns/received_events","type":"User","site_admin":false},"repo":{"id":132591818,"name":"mesos-dns","full_name":"vixns/mesos-dns","owner":{"login":"vixns","id":727336,"avatar_url":"https://avatars2.githubusercontent.com/u/727336?v=4","gravatar_id":"","url":"https://api.github.com/users/vixns","html_url":"https://github.com/vixns","followers_url":"https://api.github.com/users/vixns/followers","following_url":"https://api.github.com/users/vixns/following{/other_user}","gists_url":"https://api.github.com/users/vixns/gists{/gist_id}","starred_url":"https://api.github.com/users/vixns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vixns/subscriptions","organizations_url":"https://api.github.com/users/vixns/orgs","repos_url":"https://api.github.com/users/vixns/repos","events_url":"https://api.github.com/users/vixns/events{/privacy}","received_events_url":"https://api.github.com/users/vixns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vixns/mesos-dns","description":" DNS-based service discovery for Mesos.","fork":true,"url":"https://api.github.com/repos/vixns/mesos-dns","forks_url":"https://api.github.com/repos/vixns/mesos-dns/forks","keys_url":"https://api.github.com/repos/vixns/mesos-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vixns/mesos-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vixns/mesos-dns/teams","hooks_url":"https://api.github.com/repos/vixns/mesos-dns/hooks","issue_events_url":"https://api.github.com/repos/vixns/mesos-dns/issues/events{/number}","events_url":"https://api.github.com/repos/vixns/mesos-dns/events","assignees_url":"https://api.github.com/repos/vixns/mesos-dns/assignees{/user}","branches_url":"https://api.github.com/repos/vixns/mesos-dns/branches{/branch}","tags_url":"https://api.github.com/repos/vixns/mesos-dns/tags","blobs_url":"https://api.github.com/repos/vixns/mesos-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vixns/mesos-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vixns/mesos-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/vixns/mesos-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vixns/mesos-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/vixns/mesos-dns/languages","stargazers_url":"https://api.github.com/repos/vixns/mesos-dns/stargazers","contributors_url":"https://api.github.com/repos/vixns/mesos-dns/contributors","subscribers_url":"https://api.github.com/repos/vixns/mesos-dns/subscribers","subscription_url":"https://api.github.com/repos/vixns/mesos-dns/subscription","commits_url":"https://api.github.com/repos/vixns/mesos-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/vixns/mesos-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/vixns/mesos-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/vixns/mesos-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/vixns/mesos-dns/contents/{+path}","compare_url":"https://api.github.com/repos/vixns/mesos-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vixns/mesos-dns/merges","archive_url":"https://api.github.com/repos/vixns/mesos-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vixns/mesos-dns/downloads","issues_url":"https://api.github.com/repos/vixns/mesos-dns/issues{/number}","pulls_url":"https://api.github.com/repos/vixns/mesos-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/vixns/mesos-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/vixns/mesos-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vixns/mesos-dns/labels{/name}","releases_url":"https://api.github.com/repos/vixns/mesos-dns/releases{/id}","deployments_url":"https://api.github.com/repos/vixns/mesos-dns/deployments","created_at":"2018-05-08T10:17:16Z","updated_at":"2018-05-08T10:17:18Z","pushed_at":"2018-05-08T10:21:51Z","git_url":"git://github.com/vixns/mesos-dns.git","ssh_url":"git@github.com:vixns/mesos-dns.git","clone_url":"https://github.com/vixns/mesos-dns.git","svn_url":"https://github.com/vixns/mesos-dns","homepage":"https://mesosphere.github.com/mesos-dns","size":2262,"stargazers_count":0,"watchers_count":0,"language":"Go","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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mesosphere:master","ref":"master","sha":"950727920838971032731d6d8389a3cc44c5798b","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":26509179,"name":"mesos-dns","full_name":"mesosphere/mesos-dns","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars0.githubusercontent.com/u/3458585?v=4","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/mesos-dns","description":" DNS-based service discovery for Mesos.","fork":false,"url":"https://api.github.com/repos/mesosphere/mesos-dns","forks_url":"https://api.github.com/repos/mesosphere/mesos-dns/forks","keys_url":"https://api.github.com/repos/mesosphere/mesos-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/mesos-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/mesos-dns/teams","hooks_url":"https://api.github.com/repos/mesosphere/mesos-dns/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/mesos-dns/events","assignees_url":"https://api.github.com/repos/mesosphere/mesos-dns/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/mesos-dns/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/tags","blobs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/mesos-dns/languages","stargazers_url":"https://api.github.com/repos/mesosphere/mesos-dns/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/mesos-dns/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/mesos-dns/subscription","commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/mesos-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/mesos-dns/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/mesos-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/mesos-dns/merges","archive_url":"https://api.github.com/repos/mesosphere/mesos-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/mesos-dns/downloads","issues_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/mesos-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/mesos-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/mesos-dns/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/mesos-dns/releases{/id}","deployments_url":"https://api.github.com/repos/mesosphere/mesos-dns/deployments","created_at":"2014-11-11T23:06:33Z","updated_at":"2018-05-06T21:54:48Z","pushed_at":"2018-05-08T10:23:14Z","git_url":"git://github.com/mesosphere/mesos-dns.git","ssh_url":"git@github.com:mesosphere/mesos-dns.git","clone_url":"https://github.com/mesosphere/mesos-dns.git","svn_url":"https://github.com/mesosphere/mesos-dns","homepage":"https://mesosphere.github.com/mesos-dns","size":2262,"stargazers_count":452,"watchers_count":452,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":127,"mirror_url":null,"archived":false,"open_issues_count":72,"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":127,"open_issues":72,"watchers":452,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519"},"html":{"href":"https://github.com/mesosphere/mesos-dns/pull/519"},"issue":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/issues/519"},"comments":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/issues/519/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/519/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/mesos-dns/statuses/99f034c7b5e3cadc7b9a874788bd74aaa8eacd6b"}},"author_association":"NONE"}}
{"actor":{"display_login":"vixns"}}