{"action":"created","comment":{"url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/comments/60564222","id":60564222,"diff_hunk":"@@ -0,0 +1,140 @@\n+package main\n+\n+import (\n+\t\"os\"\n+\t\"github.com/codegangsta/cli\"\n+\t\"fmt\"\n+)\n+\n+func main() {\n+\tapp := cli.NewApp()\n+\tapp.Name = \"fetch\"\n+\tapp.Usage = \"download a file or folder from a specific release of a GitHub repo subject to the Semantic Versioning constraints you impose\"\n+\tapp.Version = getVersion(Version, VersionPrerelease)\n+\n+\tapp.Flags = []cli.Flag{\n+\t\tcli.StringFlag{\n+\t\t\tName: \"repo\",\n+\t\t\tUsage: \"Required. Fully qualified URL of the GitHub repo.\",\n+\t\t},\n+\t\tcli.StringFlag{\n+\t\t\tName: \"tag\",\n+\t\t\tUsage: \"The specific git tag to download, expressed with Version Constraint Operators.\\n\\tIf left blank, fetch will download the latest git tag.\\n\\tSee https://github.com/gruntwork-io/fetch#version-constraint-operators for examples.\",\n+\t\t},\n+\t\tcli.StringFlag{\n+\t\t\tName: \"github-oauth-token\",\n+\t\t\tUsage: \"A GitHub Personal Access Token (https://help.github.com/articles/creating-an-access-token-for-command-line-use/)\\n\\tThis is used to authenticate fetch to private GitHub repos.\",","path":"main.go","position":26,"original_position":26,"commit_id":"0764a2bb55289b6aa642b87948415f64adc58111","original_commit_id":"0764a2bb55289b6aa642b87948415f64adc58111","user":{"login":"brikis98","id":711908,"avatar_url":"https://avatars.githubusercontent.com/u/711908?v=3","gravatar_id":"","url":"https://api.github.com/users/brikis98","html_url":"https://github.com/brikis98","followers_url":"https://api.github.com/users/brikis98/followers","following_url":"https://api.github.com/users/brikis98/following{/other_user}","gists_url":"https://api.github.com/users/brikis98/gists{/gist_id}","starred_url":"https://api.github.com/users/brikis98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brikis98/subscriptions","organizations_url":"https://api.github.com/users/brikis98/orgs","repos_url":"https://api.github.com/users/brikis98/repos","events_url":"https://api.github.com/users/brikis98/events{/privacy}","received_events_url":"https://api.github.com/users/brikis98/received_events","type":"User","site_admin":false},"body":"Might want to make it clear that this is only required for private repos.","created_at":"2016-04-21T11:21:48Z","updated_at":"2016-04-21T11:21:48Z","html_url":"https://github.com/gruntwork-io/fetch/pull/1#discussion_r60564222","pull_request_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/comments/60564222"},"html":{"href":"https://github.com/gruntwork-io/fetch/pull/1#discussion_r60564222"},"pull_request":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1","id":67284509,"html_url":"https://github.com/gruntwork-io/fetch/pull/1","diff_url":"https://github.com/gruntwork-io/fetch/pull/1.diff","patch_url":"https://github.com/gruntwork-io/fetch/pull/1.patch","issue_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/1","number":1,"state":"open","locked":false,"title":"Initial release. Do not merge.","user":{"login":"josh-padnick","id":4295964,"avatar_url":"https://avatars.githubusercontent.com/u/4295964?v=3","gravatar_id":"","url":"https://api.github.com/users/josh-padnick","html_url":"https://github.com/josh-padnick","followers_url":"https://api.github.com/users/josh-padnick/followers","following_url":"https://api.github.com/users/josh-padnick/following{/other_user}","gists_url":"https://api.github.com/users/josh-padnick/gists{/gist_id}","starred_url":"https://api.github.com/users/josh-padnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh-padnick/subscriptions","organizations_url":"https://api.github.com/users/josh-padnick/orgs","repos_url":"https://api.github.com/users/josh-padnick/repos","events_url":"https://api.github.com/users/josh-padnick/events{/privacy}","received_events_url":"https://api.github.com/users/josh-padnick/received_events","type":"User","site_admin":false},"body":"This PR represents v0.0.1 of fetch, a tool for downloading files directly from a specific GitHub tag. See the README.md for all the details. \r\n\r\nI believe the nicest aspect of this tool is that you can specify version constraints for which tag to download. As a convenience, it will then download that zip file, extract only the files you need, and move them to your local destination of choice.\r\n\r\nIt does not yet validate the download with any kind of signature, but that's a sensible next step.\r\n\r\nThe only remaining item is to implement the `extractFiles()` function, but I'm out of time for the day so will finish this up first thing tomorrow, and wanted to get your feedback in the meantime.\r\n\r\n'cc @brikis98 ","created_at":"2016-04-21T01:41:02Z","updated_at":"2016-04-21T11:21:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3788fe4a22acb24103facb1ace237f2da1160c62","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/1/comments","statuses_url":"https://api.github.com/repos/gruntwork-io/fetch/statuses/0764a2bb55289b6aa642b87948415f64adc58111","head":{"label":"gruntwork-io:initial-release","ref":"initial-release","sha":"0764a2bb55289b6aa642b87948415f64adc58111","user":{"login":"gruntwork-io","id":17118990,"avatar_url":"https://avatars.githubusercontent.com/u/17118990?v=3","gravatar_id":"","url":"https://api.github.com/users/gruntwork-io","html_url":"https://github.com/gruntwork-io","followers_url":"https://api.github.com/users/gruntwork-io/followers","following_url":"https://api.github.com/users/gruntwork-io/following{/other_user}","gists_url":"https://api.github.com/users/gruntwork-io/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntwork-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntwork-io/subscriptions","organizations_url":"https://api.github.com/users/gruntwork-io/orgs","repos_url":"https://api.github.com/users/gruntwork-io/repos","events_url":"https://api.github.com/users/gruntwork-io/events{/privacy}","received_events_url":"https://api.github.com/users/gruntwork-io/received_events","type":"Organization","site_admin":false},"repo":{"id":56711104,"name":"fetch","full_name":"gruntwork-io/fetch","owner":{"login":"gruntwork-io","id":17118990,"avatar_url":"https://avatars.githubusercontent.com/u/17118990?v=3","gravatar_id":"","url":"https://api.github.com/users/gruntwork-io","html_url":"https://github.com/gruntwork-io","followers_url":"https://api.github.com/users/gruntwork-io/followers","following_url":"https://api.github.com/users/gruntwork-io/following{/other_user}","gists_url":"https://api.github.com/users/gruntwork-io/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntwork-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntwork-io/subscriptions","organizations_url":"https://api.github.com/users/gruntwork-io/orgs","repos_url":"https://api.github.com/users/gruntwork-io/repos","events_url":"https://api.github.com/users/gruntwork-io/events{/privacy}","received_events_url":"https://api.github.com/users/gruntwork-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gruntwork-io/fetch","description":"Download and validate versioned releases of GitHub repos","fork":false,"url":"https://api.github.com/repos/gruntwork-io/fetch","forks_url":"https://api.github.com/repos/gruntwork-io/fetch/forks","keys_url":"https://api.github.com/repos/gruntwork-io/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gruntwork-io/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gruntwork-io/fetch/teams","hooks_url":"https://api.github.com/repos/gruntwork-io/fetch/hooks","issue_events_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/gruntwork-io/fetch/events","assignees_url":"https://api.github.com/repos/gruntwork-io/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/gruntwork-io/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/gruntwork-io/fetch/tags","blobs_url":"https://api.github.com/repos/gruntwork-io/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gruntwork-io/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gruntwork-io/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/gruntwork-io/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gruntwork-io/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/gruntwork-io/fetch/languages","stargazers_url":"https://api.github.com/repos/gruntwork-io/fetch/stargazers","contributors_url":"https://api.github.com/repos/gruntwork-io/fetch/contributors","subscribers_url":"https://api.github.com/repos/gruntwork-io/fetch/subscribers","subscription_url":"https://api.github.com/repos/gruntwork-io/fetch/subscription","commits_url":"https://api.github.com/repos/gruntwork-io/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/gruntwork-io/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/gruntwork-io/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/gruntwork-io/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/gruntwork-io/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gruntwork-io/fetch/merges","archive_url":"https://api.github.com/repos/gruntwork-io/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gruntwork-io/fetch/downloads","issues_url":"https://api.github.com/repos/gruntwork-io/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/gruntwork-io/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/gruntwork-io/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gruntwork-io/fetch/labels{/name}","releases_url":"https://api.github.com/repos/gruntwork-io/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/gruntwork-io/fetch/deployments","created_at":"2016-04-20T18:33:25Z","updated_at":"2016-04-20T18:33:25Z","pushed_at":"2016-04-21T06:33:53Z","git_url":"git://github.com/gruntwork-io/fetch.git","ssh_url":"git@github.com:gruntwork-io/fetch.git","clone_url":"https://github.com/gruntwork-io/fetch.git","svn_url":"https://github.com/gruntwork-io/fetch","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gruntwork-io:master","ref":"master","sha":"fb9e73929323457f396ea2ff3152a2de98776926","user":{"login":"gruntwork-io","id":17118990,"avatar_url":"https://avatars.githubusercontent.com/u/17118990?v=3","gravatar_id":"","url":"https://api.github.com/users/gruntwork-io","html_url":"https://github.com/gruntwork-io","followers_url":"https://api.github.com/users/gruntwork-io/followers","following_url":"https://api.github.com/users/gruntwork-io/following{/other_user}","gists_url":"https://api.github.com/users/gruntwork-io/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntwork-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntwork-io/subscriptions","organizations_url":"https://api.github.com/users/gruntwork-io/orgs","repos_url":"https://api.github.com/users/gruntwork-io/repos","events_url":"https://api.github.com/users/gruntwork-io/events{/privacy}","received_events_url":"https://api.github.com/users/gruntwork-io/received_events","type":"Organization","site_admin":false},"repo":{"id":56711104,"name":"fetch","full_name":"gruntwork-io/fetch","owner":{"login":"gruntwork-io","id":17118990,"avatar_url":"https://avatars.githubusercontent.com/u/17118990?v=3","gravatar_id":"","url":"https://api.github.com/users/gruntwork-io","html_url":"https://github.com/gruntwork-io","followers_url":"https://api.github.com/users/gruntwork-io/followers","following_url":"https://api.github.com/users/gruntwork-io/following{/other_user}","gists_url":"https://api.github.com/users/gruntwork-io/gists{/gist_id}","starred_url":"https://api.github.com/users/gruntwork-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gruntwork-io/subscriptions","organizations_url":"https://api.github.com/users/gruntwork-io/orgs","repos_url":"https://api.github.com/users/gruntwork-io/repos","events_url":"https://api.github.com/users/gruntwork-io/events{/privacy}","received_events_url":"https://api.github.com/users/gruntwork-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gruntwork-io/fetch","description":"Download and validate versioned releases of GitHub repos","fork":false,"url":"https://api.github.com/repos/gruntwork-io/fetch","forks_url":"https://api.github.com/repos/gruntwork-io/fetch/forks","keys_url":"https://api.github.com/repos/gruntwork-io/fetch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gruntwork-io/fetch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gruntwork-io/fetch/teams","hooks_url":"https://api.github.com/repos/gruntwork-io/fetch/hooks","issue_events_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/events{/number}","events_url":"https://api.github.com/repos/gruntwork-io/fetch/events","assignees_url":"https://api.github.com/repos/gruntwork-io/fetch/assignees{/user}","branches_url":"https://api.github.com/repos/gruntwork-io/fetch/branches{/branch}","tags_url":"https://api.github.com/repos/gruntwork-io/fetch/tags","blobs_url":"https://api.github.com/repos/gruntwork-io/fetch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gruntwork-io/fetch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gruntwork-io/fetch/git/refs{/sha}","trees_url":"https://api.github.com/repos/gruntwork-io/fetch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gruntwork-io/fetch/statuses/{sha}","languages_url":"https://api.github.com/repos/gruntwork-io/fetch/languages","stargazers_url":"https://api.github.com/repos/gruntwork-io/fetch/stargazers","contributors_url":"https://api.github.com/repos/gruntwork-io/fetch/contributors","subscribers_url":"https://api.github.com/repos/gruntwork-io/fetch/subscribers","subscription_url":"https://api.github.com/repos/gruntwork-io/fetch/subscription","commits_url":"https://api.github.com/repos/gruntwork-io/fetch/commits{/sha}","git_commits_url":"https://api.github.com/repos/gruntwork-io/fetch/git/commits{/sha}","comments_url":"https://api.github.com/repos/gruntwork-io/fetch/comments{/number}","issue_comment_url":"https://api.github.com/repos/gruntwork-io/fetch/issues/comments{/number}","contents_url":"https://api.github.com/repos/gruntwork-io/fetch/contents/{+path}","compare_url":"https://api.github.com/repos/gruntwork-io/fetch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gruntwork-io/fetch/merges","archive_url":"https://api.github.com/repos/gruntwork-io/fetch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gruntwork-io/fetch/downloads","issues_url":"https://api.github.com/repos/gruntwork-io/fetch/issues{/number}","pulls_url":"https://api.github.com/repos/gruntwork-io/fetch/pulls{/number}","milestones_url":"https://api.github.com/repos/gruntwork-io/fetch/milestones{/number}","notifications_url":"https://api.github.com/repos/gruntwork-io/fetch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gruntwork-io/fetch/labels{/name}","releases_url":"https://api.github.com/repos/gruntwork-io/fetch/releases{/id}","deployments_url":"https://api.github.com/repos/gruntwork-io/fetch/deployments","created_at":"2016-04-20T18:33:25Z","updated_at":"2016-04-20T18:33:25Z","pushed_at":"2016-04-21T06:33:53Z","git_url":"git://github.com/gruntwork-io/fetch.git","ssh_url":"git@github.com:gruntwork-io/fetch.git","clone_url":"https://github.com/gruntwork-io/fetch.git","svn_url":"https://github.com/gruntwork-io/fetch","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1"},"html":{"href":"https://github.com/gruntwork-io/fetch/pull/1"},"issue":{"href":"https://api.github.com/repos/gruntwork-io/fetch/issues/1"},"comments":{"href":"https://api.github.com/repos/gruntwork-io/fetch/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gruntwork-io/fetch/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gruntwork-io/fetch/statuses/0764a2bb55289b6aa642b87948415f64adc58111"}}}}