GitHub PullRequestReviewCommentEvent at 2014-09-09 11:16:07
Repository: juju
Actor: mattyw
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/17294174","id":17294174,"diff_hunk":"@@ -0,0 +1,72 @@\n+// Copyright 2012-2014 Canonical Ltd.\n+// Licensed under the AGPLv3, see LICENCE file for details.\n+\n+package jujuc\n+\n+import (\n+\t\"fmt\"\n+\t\"strconv\"\n+\t\"strings\"\n+\n+\t\"github.com/juju/cmd\"\n+\t\"github.com/juju/errors\"\n+\t\"launchpad.net/gnuflag\"\n+)\n+\n+// Metric represents a single metric set by the charm.\n+type Metric struct {\n+\tKey   string\n+\tValue string\n+}\n+\n+// AddMetricCommand implements the add-metric command.\n+type AddMetricCommand struct {\n+\tcmd.CommandBase\n+\tctx     Context\n+\tMetrics []Metric\n+}\n+\n+// NewAddMetricCommand generates a new AddMetricCommand.\n+func NewAddMetricCommand(ctx Context) cmd.Command {\n+\treturn &AddMetricCommand{ctx: ctx}\n+}\n+\n+// Info returns the command infor structure for the add-metric command.\n+func (c *AddMetricCommand) Info() *cmd.Info {\n+\treturn &cmd.Info{\n+\t\tName:    \"add-metric\",\n+\t\tArgs:    \"key=value [key=value ...]\",\n+\t\tPurpose: \"send metrics\",\n+\t}\n+}\n+\n+// SetFlags method implements the Command interface.","path":"worker/uniter/jujuc/add-metric.go","position":43,"original_position":43,"commit_id":"3fc9d64f7c36ad208dcc75f3cea863ceba62549e","original_commit_id":"3fc9d64f7c36ad208dcc75f3cea863ceba62549e","user":{"login":"mattyw","id":160718,"avatar_url":"https://avatars.githubusercontent.com/u/160718?v=2","gravatar_id":"d50de8e132b6a611c13b6196e665ba88","url":"https://api.github.com/users/mattyw","html_url":"https://github.com/mattyw","followers_url":"https://api.github.com/users/mattyw/followers","following_url":"https://api.github.com/users/mattyw/following{/other_user}","gists_url":"https://api.github.com/users/mattyw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyw/subscriptions","organizations_url":"https://api.github.com/users/mattyw/orgs","repos_url":"https://api.github.com/users/mattyw/repos","events_url":"https://api.github.com/users/mattyw/events{/privacy}","received_events_url":"https://api.github.com/users/mattyw/received_events","type":"User","site_admin":false},"body":"I think we can remove this function is nothing happens","created_at":"2014-09-09T11:16:07Z","updated_at":"2014-09-09T11:16:07Z","html_url":"https://github.com/juju/juju/pull/640#discussion_r17294174","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/640","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/17294174"},"html":{"href":"https://github.com/juju/juju/pull/640#discussion_r17294174"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/640"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/640","id":20500654,"html_url":"https://github.com/juju/juju/pull/640","diff_url":"https://github.com/juju/juju/pull/640.diff","patch_url":"https://github.com/juju/juju/pull/640.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/640","number":640,"state":"open","locked":false,"title":"Hook tool for sending metrics from charm.","user":{"login":"tasdomas","id":119220,"avatar_url":"https://avatars.githubusercontent.com/u/119220?v=2","gravatar_id":"3c92b82c3b671a25df1bd0477dfb27b8","url":"https://api.github.com/users/tasdomas","html_url":"https://github.com/tasdomas","followers_url":"https://api.github.com/users/tasdomas/followers","following_url":"https://api.github.com/users/tasdomas/following{/other_user}","gists_url":"https://api.github.com/users/tasdomas/gists{/gist_id}","starred_url":"https://api.github.com/users/tasdomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasdomas/subscriptions","organizations_url":"https://api.github.com/users/tasdomas/orgs","repos_url":"https://api.github.com/users/tasdomas/repos","events_url":"https://api.github.com/users/tasdomas/events{/privacy}","received_events_url":"https://api.github.com/users/tasdomas/received_events","type":"User","site_admin":false},"body":"A hook tool metric-add is made available to charm authors for sending metrics to state.","created_at":"2014-08-29T13:58:38Z","updated_at":"2014-09-09T11:16:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9a49e45551f9b249f02cfe595179e0d64c47167","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/640/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/640/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments/{number}","comments_url":"https://api.github.com/repos/juju/juju/issues/640/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/3fc9d64f7c36ad208dcc75f3cea863ceba62549e","head":{"label":"tasdomas:metrics-in-hook-context","ref":"metrics-in-hook-context","sha":"3fc9d64f7c36ad208dcc75f3cea863ceba62549e","user":{"login":"tasdomas","id":119220,"avatar_url":"https://avatars.githubusercontent.com/u/119220?v=2","gravatar_id":"3c92b82c3b671a25df1bd0477dfb27b8","url":"https://api.github.com/users/tasdomas","html_url":"https://github.com/tasdomas","followers_url":"https://api.github.com/users/tasdomas/followers","following_url":"https://api.github.com/users/tasdomas/following{/other_user}","gists_url":"https://api.github.com/users/tasdomas/gists{/gist_id}","starred_url":"https://api.github.com/users/tasdomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasdomas/subscriptions","organizations_url":"https://api.github.com/users/tasdomas/orgs","repos_url":"https://api.github.com/users/tasdomas/repos","events_url":"https://api.github.com/users/tasdomas/events{/privacy}","received_events_url":"https://api.github.com/users/tasdomas/received_events","type":"User","site_admin":false},"repo":{"id":20556185,"name":"juju","full_name":"tasdomas/juju","owner":{"login":"tasdomas","id":119220,"avatar_url":"https://avatars.githubusercontent.com/u/119220?v=2","gravatar_id":"3c92b82c3b671a25df1bd0477dfb27b8","url":"https://api.github.com/users/tasdomas","html_url":"https://github.com/tasdomas","followers_url":"https://api.github.com/users/tasdomas/followers","following_url":"https://api.github.com/users/tasdomas/following{/other_user}","gists_url":"https://api.github.com/users/tasdomas/gists{/gist_id}","starred_url":"https://api.github.com/users/tasdomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasdomas/subscriptions","organizations_url":"https://api.github.com/users/tasdomas/orgs","repos_url":"https://api.github.com/users/tasdomas/repos","events_url":"https://api.github.com/users/tasdomas/events{/privacy}","received_events_url":"https://api.github.com/users/tasdomas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tasdomas/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/tasdomas/juju","forks_url":"https://api.github.com/repos/tasdomas/juju/forks","keys_url":"https://api.github.com/repos/tasdomas/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tasdomas/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tasdomas/juju/teams","hooks_url":"https://api.github.com/repos/tasdomas/juju/hooks","issue_events_url":"https://api.github.com/repos/tasdomas/juju/issues/events{/number}","events_url":"https://api.github.com/repos/tasdomas/juju/events","assignees_url":"https://api.github.com/repos/tasdomas/juju/assignees{/user}","branches_url":"https://api.github.com/repos/tasdomas/juju/branches{/branch}","tags_url":"https://api.github.com/repos/tasdomas/juju/tags","blobs_url":"https://api.github.com/repos/tasdomas/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tasdomas/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tasdomas/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/tasdomas/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tasdomas/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/tasdomas/juju/languages","stargazers_url":"https://api.github.com/repos/tasdomas/juju/stargazers","contributors_url":"https://api.github.com/repos/tasdomas/juju/contributors","subscribers_url":"https://api.github.com/repos/tasdomas/juju/subscribers","subscription_url":"https://api.github.com/repos/tasdomas/juju/subscription","commits_url":"https://api.github.com/repos/tasdomas/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/tasdomas/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/tasdomas/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/tasdomas/juju/issues/comments/{number}","contents_url":"https://api.github.com/repos/tasdomas/juju/contents/{+path}","compare_url":"https://api.github.com/repos/tasdomas/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tasdomas/juju/merges","archive_url":"https://api.github.com/repos/tasdomas/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tasdomas/juju/downloads","issues_url":"https://api.github.com/repos/tasdomas/juju/issues{/number}","pulls_url":"https://api.github.com/repos/tasdomas/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/tasdomas/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/tasdomas/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tasdomas/juju/labels{/name}","releases_url":"https://api.github.com/repos/tasdomas/juju/releases{/id}","created_at":"2014-06-06T08:13:21Z","updated_at":"2014-06-26T13:01:07Z","pushed_at":"2014-09-09T08:21:22Z","git_url":"git://github.com/tasdomas/juju.git","ssh_url":"git@github.com:tasdomas/juju.git","clone_url":"https://github.com/tasdomas/juju.git","svn_url":"https://github.com/tasdomas/juju","homepage":"juju.ubuntu.com","size":29438,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:master","ref":"master","sha":"90b282fc78481790f1cca33b4662ba91d8d25516","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=2","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=2","gravatar_id":"b095d1e26e5705abe0ad2de7d87aac2e","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments/{number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","created_at":"2014-06-03T14:28:10Z","updated_at":"2014-09-08T18:16:25Z","pushed_at":"2014-09-09T08:50:37Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":44462,"stargazers_count":203,"watchers_count":203,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":55,"mirror_url":null,"open_issues_count":51,"forks":55,"open_issues":51,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/640"},"html":{"href":"https://github.com/juju/juju/pull/640"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/640"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/640/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/640/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/640/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/3fc9d64f7c36ad208dcc75f3cea863ceba62549e"}}}}