{"action":"created","comment":{"url":"https://api.github.com/repos/clearlinux/diva/pulls/comments/222848395","pull_request_review_id":161836707,"id":222848395,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjg0ODM5NQ==","diff_hunk":"@@ -20,22 +20,82 @@ import (\n \n \t\"github.com/clearlinux/diva/bloatcheck\"\n \t\"github.com/clearlinux/diva/diva\"\n+\t\"github.com/clearlinux/diva/internal/config\"\n \t\"github.com/clearlinux/diva/internal/helpers\"\n+\t\"github.com/clearlinux/diva/pkginfo\"\n \t\"github.com/spf13/cobra\"\n )\n \n var highPrioBundles = map[string]bool{\"os-core\": true, \"os-core-update\": true, \"c-basic\": true, \"kernel\": true}\n \n type bloatCheckCmdFlags struct {\n+\tmixName     string\n+\tlatest      bool\n \tprintOutput bool\n \tfailCap     float64\n \twarningCap  float64\n-\tbundleURL   string\n-\tversion     string\n }\n \n var bloatFlags bloatCheckCmdFlags\n \n+func init() {\n+\tbloatCheckCmd.Flags().StringVarP(&bloatFlags.mixName, \"name\", \"n\", \"clear\", \"name of data group\")\n+\tbloatCheckCmd.Flags().BoolVar(&bloatFlags.latest, \"latest\", false, \"get the latest version from upstreamURL\")\n+\tbloatCheckCmd.Flags().BoolVarP(&bloatFlags.printOutput, \"print\", \"p\", false, \"Print out bundles that increased in size\")\n+\tbloatCheckCmd.Flags().Float64Var(&bloatFlags.failCap, \"max\", 10.0, \"Set the max % a high priority bundle may increase.\")\n+\tbloatCheckCmd.Flags().Float64Var(&bloatFlags.warningCap, \"warn\", 20.0, \"Set the % bundle size change that will emit a warning.\")\n+}\n+\n+type manifestsInfo struct {\n+\tminMInfo pkginfo.ManifestInfo\n+\tmaxMInfo pkginfo.ManifestInfo\n+}\n+\n+var bloatCheckCmd = &cobra.Command{\n+\tUse:   \"bloat [version] <to version>\",\n+\tShort: \"Check bundle size variation between builds\",\n+\tLong: `Check bundle size variation between 2 builds by supplying two\n+versions (to & from). You can omit the second \"to version\" to get the size\n+of every bundle from one build only`,\n+\tArgs: cobra.MinimumNArgs(1),\n+\tRun: func(cmd *cobra.Command, args []string) {\n+\n+\t\t// set Ver to be the first arg passed, in case only one arg is passed\n+\t\tu := config.UInfo{\n+\t\t\tVer:     args[0],\n+\t\t\tLatest:  bloatFlags.latest,\n+\t\t\tMixName: bloatFlags.mixName,\n+\t\t}\n+\t\tconfig.UpdateConfigInstance(conf, u)","path":"cmd/bloat.go","position":52,"original_position":52,"commit_id":"5c0da53781f46415c86a73e61207118005be1140","original_commit_id":"f948ad55a960ec729ca6a5b5cac891d43b22220f","user":{"login":"tmarcu","id":574028,"node_id":"MDQ6VXNlcjU3NDAyOA==","avatar_url":"https://avatars2.githubusercontent.com/u/574028?v=4","gravatar_id":"","url":"https://api.github.com/users/tmarcu","html_url":"https://github.com/tmarcu","followers_url":"https://api.github.com/users/tmarcu/followers","following_url":"https://api.github.com/users/tmarcu/following{/other_user}","gists_url":"https://api.github.com/users/tmarcu/gists{/gist_id}","starred_url":"https://api.github.com/users/tmarcu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmarcu/subscriptions","organizations_url":"https://api.github.com/users/tmarcu/orgs","repos_url":"https://api.github.com/users/tmarcu/repos","events_url":"https://api.github.com/users/tmarcu/events{/privacy}","received_events_url":"https://api.github.com/users/tmarcu/received_events","type":"User","site_admin":false},"body":"I'm not sure you want to do this before you figure out which argument should come first, do you? ","created_at":"2018-10-04T22:37:47Z","updated_at":"2018-10-04T22:37:47Z","html_url":"https://github.com/clearlinux/diva/pull/100#discussion_r222848395","pull_request_url":"https://api.github.com/repos/clearlinux/diva/pulls/100","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/comments/222848395"},"html":{"href":"https://github.com/clearlinux/diva/pull/100#discussion_r222848395"},"pull_request":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/clearlinux/diva/pulls/100","id":220122544,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMTIyNTQ0","html_url":"https://github.com/clearlinux/diva/pull/100","diff_url":"https://github.com/clearlinux/diva/pull/100.diff","patch_url":"https://github.com/clearlinux/diva/pull/100.patch","issue_url":"https://api.github.com/repos/clearlinux/diva/issues/100","number":100,"state":"open","locked":false,"title":"Phasethree","user":{"login":"Gabib32","id":8284020,"node_id":"MDQ6VXNlcjgyODQwMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/8284020?v=4","gravatar_id":"","url":"https://api.github.com/users/Gabib32","html_url":"https://github.com/Gabib32","followers_url":"https://api.github.com/users/Gabib32/followers","following_url":"https://api.github.com/users/Gabib32/following{/other_user}","gists_url":"https://api.github.com/users/Gabib32/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabib32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabib32/subscriptions","organizations_url":"https://api.github.com/users/Gabib32/orgs","repos_url":"https://api.github.com/users/Gabib32/repos","events_url":"https://api.github.com/users/Gabib32/events{/privacy}","received_events_url":"https://api.github.com/users/Gabib32/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-03T17:43:23Z","updated_at":"2018-10-04T22:37:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b17ab1b737ea502472f6f9827d70e194b30c7927","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clearlinux/diva/pulls/100/commits","review_comments_url":"https://api.github.com/repos/clearlinux/diva/pulls/100/comments","review_comment_url":"https://api.github.com/repos/clearlinux/diva/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clearlinux/diva/issues/100/comments","statuses_url":"https://api.github.com/repos/clearlinux/diva/statuses/5c0da53781f46415c86a73e61207118005be1140","head":{"label":"Gabib32:phasethree","ref":"phasethree","sha":"5c0da53781f46415c86a73e61207118005be1140","user":{"login":"Gabib32","id":8284020,"node_id":"MDQ6VXNlcjgyODQwMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/8284020?v=4","gravatar_id":"","url":"https://api.github.com/users/Gabib32","html_url":"https://github.com/Gabib32","followers_url":"https://api.github.com/users/Gabib32/followers","following_url":"https://api.github.com/users/Gabib32/following{/other_user}","gists_url":"https://api.github.com/users/Gabib32/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabib32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabib32/subscriptions","organizations_url":"https://api.github.com/users/Gabib32/orgs","repos_url":"https://api.github.com/users/Gabib32/repos","events_url":"https://api.github.com/users/Gabib32/events{/privacy}","received_events_url":"https://api.github.com/users/Gabib32/received_events","type":"User","site_admin":false},"repo":{"id":138335271,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgzMzUyNzE=","name":"diva","full_name":"Gabib32/diva","private":false,"owner":{"login":"Gabib32","id":8284020,"node_id":"MDQ6VXNlcjgyODQwMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/8284020?v=4","gravatar_id":"","url":"https://api.github.com/users/Gabib32","html_url":"https://github.com/Gabib32","followers_url":"https://api.github.com/users/Gabib32/followers","following_url":"https://api.github.com/users/Gabib32/following{/other_user}","gists_url":"https://api.github.com/users/Gabib32/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabib32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabib32/subscriptions","organizations_url":"https://api.github.com/users/Gabib32/orgs","repos_url":"https://api.github.com/users/Gabib32/repos","events_url":"https://api.github.com/users/Gabib32/events{/privacy}","received_events_url":"https://api.github.com/users/Gabib32/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Gabib32/diva","description":null,"fork":true,"url":"https://api.github.com/repos/Gabib32/diva","forks_url":"https://api.github.com/repos/Gabib32/diva/forks","keys_url":"https://api.github.com/repos/Gabib32/diva/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gabib32/diva/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gabib32/diva/teams","hooks_url":"https://api.github.com/repos/Gabib32/diva/hooks","issue_events_url":"https://api.github.com/repos/Gabib32/diva/issues/events{/number}","events_url":"https://api.github.com/repos/Gabib32/diva/events","assignees_url":"https://api.github.com/repos/Gabib32/diva/assignees{/user}","branches_url":"https://api.github.com/repos/Gabib32/diva/branches{/branch}","tags_url":"https://api.github.com/repos/Gabib32/diva/tags","blobs_url":"https://api.github.com/repos/Gabib32/diva/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gabib32/diva/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gabib32/diva/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gabib32/diva/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gabib32/diva/statuses/{sha}","languages_url":"https://api.github.com/repos/Gabib32/diva/languages","stargazers_url":"https://api.github.com/repos/Gabib32/diva/stargazers","contributors_url":"https://api.github.com/repos/Gabib32/diva/contributors","subscribers_url":"https://api.github.com/repos/Gabib32/diva/subscribers","subscription_url":"https://api.github.com/repos/Gabib32/diva/subscription","commits_url":"https://api.github.com/repos/Gabib32/diva/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gabib32/diva/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gabib32/diva/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gabib32/diva/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gabib32/diva/contents/{+path}","compare_url":"https://api.github.com/repos/Gabib32/diva/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gabib32/diva/merges","archive_url":"https://api.github.com/repos/Gabib32/diva/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gabib32/diva/downloads","issues_url":"https://api.github.com/repos/Gabib32/diva/issues{/number}","pulls_url":"https://api.github.com/repos/Gabib32/diva/pulls{/number}","milestones_url":"https://api.github.com/repos/Gabib32/diva/milestones{/number}","notifications_url":"https://api.github.com/repos/Gabib32/diva/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gabib32/diva/labels{/name}","releases_url":"https://api.github.com/repos/Gabib32/diva/releases{/id}","deployments_url":"https://api.github.com/repos/Gabib32/diva/deployments","created_at":"2018-06-22T18:24:50Z","updated_at":"2018-10-03T18:54:56Z","pushed_at":"2018-10-04T19:06:13Z","git_url":"git://github.com/Gabib32/diva.git","ssh_url":"git@github.com:Gabib32/diva.git","clone_url":"https://github.com/Gabib32/diva.git","svn_url":"https://github.com/Gabib32/diva","homepage":null,"size":221,"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":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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"clearlinux:master","ref":"master","sha":"579d7a69c1e4baa0b8fb08ab2873f6dfa98419a5","user":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":133871444,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM4NzE0NDQ=","name":"diva","full_name":"clearlinux/diva","private":false,"owner":{"login":"clearlinux","id":12545216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTQ1MjE2","avatar_url":"https://avatars2.githubusercontent.com/u/12545216?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlinux","html_url":"https://github.com/clearlinux","followers_url":"https://api.github.com/users/clearlinux/followers","following_url":"https://api.github.com/users/clearlinux/following{/other_user}","gists_url":"https://api.github.com/users/clearlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlinux/subscriptions","organizations_url":"https://api.github.com/users/clearlinux/orgs","repos_url":"https://api.github.com/users/clearlinux/repos","events_url":"https://api.github.com/users/clearlinux/events{/privacy}","received_events_url":"https://api.github.com/users/clearlinux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/clearlinux/diva","description":null,"fork":false,"url":"https://api.github.com/repos/clearlinux/diva","forks_url":"https://api.github.com/repos/clearlinux/diva/forks","keys_url":"https://api.github.com/repos/clearlinux/diva/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearlinux/diva/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearlinux/diva/teams","hooks_url":"https://api.github.com/repos/clearlinux/diva/hooks","issue_events_url":"https://api.github.com/repos/clearlinux/diva/issues/events{/number}","events_url":"https://api.github.com/repos/clearlinux/diva/events","assignees_url":"https://api.github.com/repos/clearlinux/diva/assignees{/user}","branches_url":"https://api.github.com/repos/clearlinux/diva/branches{/branch}","tags_url":"https://api.github.com/repos/clearlinux/diva/tags","blobs_url":"https://api.github.com/repos/clearlinux/diva/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearlinux/diva/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearlinux/diva/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearlinux/diva/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearlinux/diva/statuses/{sha}","languages_url":"https://api.github.com/repos/clearlinux/diva/languages","stargazers_url":"https://api.github.com/repos/clearlinux/diva/stargazers","contributors_url":"https://api.github.com/repos/clearlinux/diva/contributors","subscribers_url":"https://api.github.com/repos/clearlinux/diva/subscribers","subscription_url":"https://api.github.com/repos/clearlinux/diva/subscription","commits_url":"https://api.github.com/repos/clearlinux/diva/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearlinux/diva/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearlinux/diva/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearlinux/diva/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearlinux/diva/contents/{+path}","compare_url":"https://api.github.com/repos/clearlinux/diva/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearlinux/diva/merges","archive_url":"https://api.github.com/repos/clearlinux/diva/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearlinux/diva/downloads","issues_url":"https://api.github.com/repos/clearlinux/diva/issues{/number}","pulls_url":"https://api.github.com/repos/clearlinux/diva/pulls{/number}","milestones_url":"https://api.github.com/repos/clearlinux/diva/milestones{/number}","notifications_url":"https://api.github.com/repos/clearlinux/diva/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearlinux/diva/labels{/name}","releases_url":"https://api.github.com/repos/clearlinux/diva/releases{/id}","deployments_url":"https://api.github.com/repos/clearlinux/diva/deployments","created_at":"2018-05-17T21:42:55Z","updated_at":"2018-10-01T18:16:27Z","pushed_at":"2018-10-04T19:06:14Z","git_url":"git://github.com/clearlinux/diva.git","ssh_url":"git@github.com:clearlinux/diva.git","clone_url":"https://github.com/clearlinux/diva.git","svn_url":"https://github.com/clearlinux/diva","homepage":null,"size":147,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":24,"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":5,"open_issues":24,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/100"},"html":{"href":"https://github.com/clearlinux/diva/pull/100"},"issue":{"href":"https://api.github.com/repos/clearlinux/diva/issues/100"},"comments":{"href":"https://api.github.com/repos/clearlinux/diva/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clearlinux/diva/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/clearlinux/diva/statuses/5c0da53781f46415c86a73e61207118005be1140"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tmarcu"}}