{"action":"created","comment":{"url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/comments/73313783","id":73313783,"diff_hunk":"@@ -0,0 +1,67 @@\n+/*\n+ * Copyright 2016 Red Hat, Inc. and/or its affiliates\n+ * and other contributors as indicated by the @author tags.\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+package org.hawkular.services.rest;\n+\n+import java.io.InputStream;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.jar.Attributes;\n+import java.util.jar.Manifest;\n+\n+import javax.enterprise.context.ApplicationScoped;\n+import javax.servlet.ServletContext;\n+\n+import com.google.common.collect.ImmutableList;\n+\n+/**\n+ * Manifest extraction.\n+ * Credits to Hawkular Metrics team.\n+ *\n+ * @author Jay Shaughnessy\n+ * @author Lucas Ponce\n+ */\n+@ApplicationScoped\n+public class ManifestUtil {","path":"hawkular-status/src/main/java/org/hawkular/services/rest/ManifestUtil.java","position":39,"original_position":39,"commit_id":"2bba290f1ede25e76c2c0507ed2195af125678e0","original_commit_id":"2bba290f1ede25e76c2c0507ed2195af125678e0","user":{"login":"jpkrohling","id":13387,"avatar_url":"https://avatars.githubusercontent.com/u/13387?v=3","gravatar_id":"","url":"https://api.github.com/users/jpkrohling","html_url":"https://github.com/jpkrohling","followers_url":"https://api.github.com/users/jpkrohling/followers","following_url":"https://api.github.com/users/jpkrohling/following{/other_user}","gists_url":"https://api.github.com/users/jpkrohling/gists{/gist_id}","starred_url":"https://api.github.com/users/jpkrohling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpkrohling/subscriptions","organizations_url":"https://api.github.com/users/jpkrohling/orgs","repos_url":"https://api.github.com/users/jpkrohling/repos","events_url":"https://api.github.com/users/jpkrohling/events{/privacy}","received_events_url":"https://api.github.com/users/jpkrohling/received_events","type":"User","site_admin":false},"body":"There's a class like that on commons. Why not use that one? \r\nhttps://github.com/jpkrohling/hawkular-commons/blob/master/hawkular-rest-status/src/main/java/org/hawkular/commons/rest/status/ManifestUtil.java","created_at":"2016-08-03T10:18:05Z","updated_at":"2016-08-03T10:18:05Z","html_url":"https://github.com/hawkular/hawkular-services/pull/47#discussion_r73313783","pull_request_url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/comments/73313783"},"html":{"href":"https://github.com/hawkular/hawkular-services/pull/47#discussion_r73313783"},"pull_request":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47","id":79877179,"html_url":"https://github.com/hawkular/hawkular-services/pull/47","diff_url":"https://github.com/hawkular/hawkular-services/pull/47.diff","patch_url":"https://github.com/hawkular/hawkular-services/pull/47.patch","issue_url":"https://api.github.com/repos/hawkular/hawkular-services/issues/47","number":47,"state":"open","locked":false,"title":"Add a global /status for Hawkular Services","user":{"login":"lucasponce","id":1662329,"avatar_url":"https://avatars.githubusercontent.com/u/1662329?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasponce","html_url":"https://github.com/lucasponce","followers_url":"https://api.github.com/users/lucasponce/followers","following_url":"https://api.github.com/users/lucasponce/following{/other_user}","gists_url":"https://api.github.com/users/lucasponce/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasponce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasponce/subscriptions","organizations_url":"https://api.github.com/users/lucasponce/orgs","repos_url":"https://api.github.com/users/lucasponce/repos","events_url":"https://api.github.com/users/lucasponce/events{/privacy}","received_events_url":"https://api.github.com/users/lucasponce/received_events","type":"User","site_admin":false},"body":"![image](https://cloud.githubusercontent.com/assets/1662329/17361237/c90ff8dc-596f-11e6-8335-72786935f310.png)\r\nI have added a global /status endpoint for Hawkular Services version.\r\nIt will be helpful to check which version is running, avoiding to check the bytes.\r\nLogic for the main STATUS state is an and of metrics,inventory and alerts status.\r\nThere are things that can be done in following PR like unify with inventory the same format of status, and extracting the manipulation of Manifest in common.\r\nBut I think this it could be a start point for adding this feature.\r\nPlease @jpkrohling can you start reviewing it ?\r\nThanks","created_at":"2016-08-03T09:48:21Z","updated_at":"2016-08-03T10:18:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c20fa7cd09644b76824a7d3c7a2e6412f10b1e7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47/commits","review_comments_url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47/comments","review_comment_url":"https://api.github.com/repos/hawkular/hawkular-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hawkular/hawkular-services/issues/47/comments","statuses_url":"https://api.github.com/repos/hawkular/hawkular-services/statuses/2bba290f1ede25e76c2c0507ed2195af125678e0","head":{"label":"lucasponce:hawkular-services-status","ref":"hawkular-services-status","sha":"2bba290f1ede25e76c2c0507ed2195af125678e0","user":{"login":"lucasponce","id":1662329,"avatar_url":"https://avatars.githubusercontent.com/u/1662329?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasponce","html_url":"https://github.com/lucasponce","followers_url":"https://api.github.com/users/lucasponce/followers","following_url":"https://api.github.com/users/lucasponce/following{/other_user}","gists_url":"https://api.github.com/users/lucasponce/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasponce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasponce/subscriptions","organizations_url":"https://api.github.com/users/lucasponce/orgs","repos_url":"https://api.github.com/users/lucasponce/repos","events_url":"https://api.github.com/users/lucasponce/events{/privacy}","received_events_url":"https://api.github.com/users/lucasponce/received_events","type":"User","site_admin":false},"repo":{"id":59730526,"name":"hawkular-services","full_name":"lucasponce/hawkular-services","owner":{"login":"lucasponce","id":1662329,"avatar_url":"https://avatars.githubusercontent.com/u/1662329?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasponce","html_url":"https://github.com/lucasponce","followers_url":"https://api.github.com/users/lucasponce/followers","following_url":"https://api.github.com/users/lucasponce/following{/other_user}","gists_url":"https://api.github.com/users/lucasponce/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasponce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasponce/subscriptions","organizations_url":"https://api.github.com/users/lucasponce/orgs","repos_url":"https://api.github.com/users/lucasponce/repos","events_url":"https://api.github.com/users/lucasponce/events{/privacy}","received_events_url":"https://api.github.com/users/lucasponce/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucasponce/hawkular-services","description":"","fork":true,"url":"https://api.github.com/repos/lucasponce/hawkular-services","forks_url":"https://api.github.com/repos/lucasponce/hawkular-services/forks","keys_url":"https://api.github.com/repos/lucasponce/hawkular-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucasponce/hawkular-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucasponce/hawkular-services/teams","hooks_url":"https://api.github.com/repos/lucasponce/hawkular-services/hooks","issue_events_url":"https://api.github.com/repos/lucasponce/hawkular-services/issues/events{/number}","events_url":"https://api.github.com/repos/lucasponce/hawkular-services/events","assignees_url":"https://api.github.com/repos/lucasponce/hawkular-services/assignees{/user}","branches_url":"https://api.github.com/repos/lucasponce/hawkular-services/branches{/branch}","tags_url":"https://api.github.com/repos/lucasponce/hawkular-services/tags","blobs_url":"https://api.github.com/repos/lucasponce/hawkular-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucasponce/hawkular-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucasponce/hawkular-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucasponce/hawkular-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucasponce/hawkular-services/statuses/{sha}","languages_url":"https://api.github.com/repos/lucasponce/hawkular-services/languages","stargazers_url":"https://api.github.com/repos/lucasponce/hawkular-services/stargazers","contributors_url":"https://api.github.com/repos/lucasponce/hawkular-services/contributors","subscribers_url":"https://api.github.com/repos/lucasponce/hawkular-services/subscribers","subscription_url":"https://api.github.com/repos/lucasponce/hawkular-services/subscription","commits_url":"https://api.github.com/repos/lucasponce/hawkular-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucasponce/hawkular-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucasponce/hawkular-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucasponce/hawkular-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucasponce/hawkular-services/contents/{+path}","compare_url":"https://api.github.com/repos/lucasponce/hawkular-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucasponce/hawkular-services/merges","archive_url":"https://api.github.com/repos/lucasponce/hawkular-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucasponce/hawkular-services/downloads","issues_url":"https://api.github.com/repos/lucasponce/hawkular-services/issues{/number}","pulls_url":"https://api.github.com/repos/lucasponce/hawkular-services/pulls{/number}","milestones_url":"https://api.github.com/repos/lucasponce/hawkular-services/milestones{/number}","notifications_url":"https://api.github.com/repos/lucasponce/hawkular-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucasponce/hawkular-services/labels{/name}","releases_url":"https://api.github.com/repos/lucasponce/hawkular-services/releases{/id}","deployments_url":"https://api.github.com/repos/lucasponce/hawkular-services/deployments","created_at":"2016-05-26T07:45:03Z","updated_at":"2016-05-26T14:39:38Z","pushed_at":"2016-08-03T09:44:50Z","git_url":"git://github.com/lucasponce/hawkular-services.git","ssh_url":"git@github.com:lucasponce/hawkular-services.git","clone_url":"https://github.com/lucasponce/hawkular-services.git","svn_url":"https://github.com/lucasponce/hawkular-services","homepage":null,"size":315,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hawkular:master","ref":"master","sha":"eab94f9c56a324213ff17d5d62b73cf536320446","user":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"repo":{"id":57245170,"name":"hawkular-services","full_name":"hawkular/hawkular-services","owner":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hawkular/hawkular-services","description":"","fork":false,"url":"https://api.github.com/repos/hawkular/hawkular-services","forks_url":"https://api.github.com/repos/hawkular/hawkular-services/forks","keys_url":"https://api.github.com/repos/hawkular/hawkular-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkular/hawkular-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkular/hawkular-services/teams","hooks_url":"https://api.github.com/repos/hawkular/hawkular-services/hooks","issue_events_url":"https://api.github.com/repos/hawkular/hawkular-services/issues/events{/number}","events_url":"https://api.github.com/repos/hawkular/hawkular-services/events","assignees_url":"https://api.github.com/repos/hawkular/hawkular-services/assignees{/user}","branches_url":"https://api.github.com/repos/hawkular/hawkular-services/branches{/branch}","tags_url":"https://api.github.com/repos/hawkular/hawkular-services/tags","blobs_url":"https://api.github.com/repos/hawkular/hawkular-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkular/hawkular-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkular/hawkular-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkular/hawkular-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkular/hawkular-services/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkular/hawkular-services/languages","stargazers_url":"https://api.github.com/repos/hawkular/hawkular-services/stargazers","contributors_url":"https://api.github.com/repos/hawkular/hawkular-services/contributors","subscribers_url":"https://api.github.com/repos/hawkular/hawkular-services/subscribers","subscription_url":"https://api.github.com/repos/hawkular/hawkular-services/subscription","commits_url":"https://api.github.com/repos/hawkular/hawkular-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkular/hawkular-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkular/hawkular-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkular/hawkular-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkular/hawkular-services/contents/{+path}","compare_url":"https://api.github.com/repos/hawkular/hawkular-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkular/hawkular-services/merges","archive_url":"https://api.github.com/repos/hawkular/hawkular-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkular/hawkular-services/downloads","issues_url":"https://api.github.com/repos/hawkular/hawkular-services/issues{/number}","pulls_url":"https://api.github.com/repos/hawkular/hawkular-services/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkular/hawkular-services/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkular/hawkular-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkular/hawkular-services/labels{/name}","releases_url":"https://api.github.com/repos/hawkular/hawkular-services/releases{/id}","deployments_url":"https://api.github.com/repos/hawkular/hawkular-services/deployments","created_at":"2016-04-27T20:25:31Z","updated_at":"2016-06-29T09:40:32Z","pushed_at":"2016-08-03T09:48:22Z","git_url":"git://github.com/hawkular/hawkular-services.git","ssh_url":"git@github.com:hawkular/hawkular-services.git","clone_url":"https://github.com/hawkular/hawkular-services.git","svn_url":"https://github.com/hawkular/hawkular-services","homepage":null,"size":363,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":4,"forks":13,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47"},"html":{"href":"https://github.com/hawkular/hawkular-services/pull/47"},"issue":{"href":"https://api.github.com/repos/hawkular/hawkular-services/issues/47"},"comments":{"href":"https://api.github.com/repos/hawkular/hawkular-services/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hawkular/hawkular-services/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/hawkular/hawkular-services/statuses/2bba290f1ede25e76c2c0507ed2195af125678e0"}}}}
{"actor":{"display_login":"jpkrohling"}}