{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2","id":50404830,"html_url":"https://github.com/larsbrinkhoff/github-scripts/pull/2","diff_url":"https://github.com/larsbrinkhoff/github-scripts/pull/2.diff","patch_url":"https://github.com/larsbrinkhoff/github-scripts/pull/2.patch","issue_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/2","number":2,"state":"closed","locked":false,"title":"Improve samples.sh interface","user":{"login":"pchaigno","id":1764210,"avatar_url":"https://avatars.githubusercontent.com/u/1764210?v=3","gravatar_id":"","url":"https://api.github.com/users/pchaigno","html_url":"https://github.com/pchaigno","followers_url":"https://api.github.com/users/pchaigno/followers","following_url":"https://api.github.com/users/pchaigno/following{/other_user}","gists_url":"https://api.github.com/users/pchaigno/gists{/gist_id}","starred_url":"https://api.github.com/users/pchaigno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchaigno/subscriptions","organizations_url":"https://api.github.com/users/pchaigno/orgs","repos_url":"https://api.github.com/users/pchaigno/repos","events_url":"https://api.github.com/users/pchaigno/events{/privacy}","received_events_url":"https://api.github.com/users/pchaigno/received_events","type":"User","site_admin":false},"body":"I've been using this script quite a lot lately, so I thought I could contribute back.\r\nThe input query and the output folder can now be passed as arguments (first and second arguments respectively).\r\nThe script should output something like this:\r\n```\r\n$ ./samples.sh \"extension:cake NOT coffee\" samples-test\r\nFetching search results:\r\n[==================================================>] 100% (34)\r\nDownloading files:\r\n[===================>                               ] 39% (133)\r\n```","created_at":"2015-11-11T16:38:12Z","updated_at":"2015-11-11T16:43:37Z","closed_at":"2015-11-11T16:43:37Z","merged_at":"2015-11-11T16:43:37Z","merge_commit_sha":"a6277ff6a69bcd55c4751ac0ee36ca6596e9cc93","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2/commits","review_comments_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2/comments","review_comment_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/2/comments","statuses_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/statuses/5b3ead5eb002f3acba3507f947e9ddeebe9bfea4","head":{"label":"pchaigno:improve-samples.sh-interface","ref":"improve-samples.sh-interface","sha":"5b3ead5eb002f3acba3507f947e9ddeebe9bfea4","user":{"login":"pchaigno","id":1764210,"avatar_url":"https://avatars.githubusercontent.com/u/1764210?v=3","gravatar_id":"","url":"https://api.github.com/users/pchaigno","html_url":"https://github.com/pchaigno","followers_url":"https://api.github.com/users/pchaigno/followers","following_url":"https://api.github.com/users/pchaigno/following{/other_user}","gists_url":"https://api.github.com/users/pchaigno/gists{/gist_id}","starred_url":"https://api.github.com/users/pchaigno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchaigno/subscriptions","organizations_url":"https://api.github.com/users/pchaigno/orgs","repos_url":"https://api.github.com/users/pchaigno/repos","events_url":"https://api.github.com/users/pchaigno/events{/privacy}","received_events_url":"https://api.github.com/users/pchaigno/received_events","type":"User","site_admin":false},"repo":{"id":34983067,"name":"github-scripts","full_name":"pchaigno/github-scripts","owner":{"login":"pchaigno","id":1764210,"avatar_url":"https://avatars.githubusercontent.com/u/1764210?v=3","gravatar_id":"","url":"https://api.github.com/users/pchaigno","html_url":"https://github.com/pchaigno","followers_url":"https://api.github.com/users/pchaigno/followers","following_url":"https://api.github.com/users/pchaigno/following{/other_user}","gists_url":"https://api.github.com/users/pchaigno/gists{/gist_id}","starred_url":"https://api.github.com/users/pchaigno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchaigno/subscriptions","organizations_url":"https://api.github.com/users/pchaigno/orgs","repos_url":"https://api.github.com/users/pchaigno/repos","events_url":"https://api.github.com/users/pchaigno/events{/privacy}","received_events_url":"https://api.github.com/users/pchaigno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pchaigno/github-scripts","description":"","fork":true,"url":"https://api.github.com/repos/pchaigno/github-scripts","forks_url":"https://api.github.com/repos/pchaigno/github-scripts/forks","keys_url":"https://api.github.com/repos/pchaigno/github-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pchaigno/github-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pchaigno/github-scripts/teams","hooks_url":"https://api.github.com/repos/pchaigno/github-scripts/hooks","issue_events_url":"https://api.github.com/repos/pchaigno/github-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/pchaigno/github-scripts/events","assignees_url":"https://api.github.com/repos/pchaigno/github-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/pchaigno/github-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/pchaigno/github-scripts/tags","blobs_url":"https://api.github.com/repos/pchaigno/github-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pchaigno/github-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pchaigno/github-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/pchaigno/github-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pchaigno/github-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/pchaigno/github-scripts/languages","stargazers_url":"https://api.github.com/repos/pchaigno/github-scripts/stargazers","contributors_url":"https://api.github.com/repos/pchaigno/github-scripts/contributors","subscribers_url":"https://api.github.com/repos/pchaigno/github-scripts/subscribers","subscription_url":"https://api.github.com/repos/pchaigno/github-scripts/subscription","commits_url":"https://api.github.com/repos/pchaigno/github-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/pchaigno/github-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/pchaigno/github-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/pchaigno/github-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/pchaigno/github-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/pchaigno/github-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pchaigno/github-scripts/merges","archive_url":"https://api.github.com/repos/pchaigno/github-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pchaigno/github-scripts/downloads","issues_url":"https://api.github.com/repos/pchaigno/github-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/pchaigno/github-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/pchaigno/github-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/pchaigno/github-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pchaigno/github-scripts/labels{/name}","releases_url":"https://api.github.com/repos/pchaigno/github-scripts/releases{/id}","created_at":"2015-05-03T11:05:52Z","updated_at":"2015-05-03T11:05:53Z","pushed_at":"2015-11-11T16:01:05Z","git_url":"git://github.com/pchaigno/github-scripts.git","ssh_url":"git@github.com:pchaigno/github-scripts.git","clone_url":"https://github.com/pchaigno/github-scripts.git","svn_url":"https://github.com/pchaigno/github-scripts","homepage":null,"size":124,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"larsbrinkhoff:master","ref":"master","sha":"e1b633bfa29af1145ea7d9aeb738f71ce8536055","user":{"login":"larsbrinkhoff","id":775050,"avatar_url":"https://avatars.githubusercontent.com/u/775050?v=3","gravatar_id":"","url":"https://api.github.com/users/larsbrinkhoff","html_url":"https://github.com/larsbrinkhoff","followers_url":"https://api.github.com/users/larsbrinkhoff/followers","following_url":"https://api.github.com/users/larsbrinkhoff/following{/other_user}","gists_url":"https://api.github.com/users/larsbrinkhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/larsbrinkhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsbrinkhoff/subscriptions","organizations_url":"https://api.github.com/users/larsbrinkhoff/orgs","repos_url":"https://api.github.com/users/larsbrinkhoff/repos","events_url":"https://api.github.com/users/larsbrinkhoff/events{/privacy}","received_events_url":"https://api.github.com/users/larsbrinkhoff/received_events","type":"User","site_admin":false},"repo":{"id":33986672,"name":"github-scripts","full_name":"larsbrinkhoff/github-scripts","owner":{"login":"larsbrinkhoff","id":775050,"avatar_url":"https://avatars.githubusercontent.com/u/775050?v=3","gravatar_id":"","url":"https://api.github.com/users/larsbrinkhoff","html_url":"https://github.com/larsbrinkhoff","followers_url":"https://api.github.com/users/larsbrinkhoff/followers","following_url":"https://api.github.com/users/larsbrinkhoff/following{/other_user}","gists_url":"https://api.github.com/users/larsbrinkhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/larsbrinkhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsbrinkhoff/subscriptions","organizations_url":"https://api.github.com/users/larsbrinkhoff/orgs","repos_url":"https://api.github.com/users/larsbrinkhoff/repos","events_url":"https://api.github.com/users/larsbrinkhoff/events{/privacy}","received_events_url":"https://api.github.com/users/larsbrinkhoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larsbrinkhoff/github-scripts","description":"","fork":false,"url":"https://api.github.com/repos/larsbrinkhoff/github-scripts","forks_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/forks","keys_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/teams","hooks_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/hooks","issue_events_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/events","assignees_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/tags","blobs_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/languages","stargazers_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/stargazers","contributors_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/contributors","subscribers_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/subscribers","subscription_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/subscription","commits_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/merges","archive_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/downloads","issues_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/labels{/name}","releases_url":"https://api.github.com/repos/larsbrinkhoff/github-scripts/releases{/id}","created_at":"2015-04-15T10:04:18Z","updated_at":"2015-05-04T08:03:29Z","pushed_at":"2015-11-11T16:43:37Z","git_url":"git://github.com/larsbrinkhoff/github-scripts.git","ssh_url":"git@github.com:larsbrinkhoff/github-scripts.git","clone_url":"https://github.com/larsbrinkhoff/github-scripts.git","svn_url":"https://github.com/larsbrinkhoff/github-scripts","homepage":null,"size":150,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2"},"html":{"href":"https://github.com/larsbrinkhoff/github-scripts/pull/2"},"issue":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/2"},"comments":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/larsbrinkhoff/github-scripts/statuses/5b3ead5eb002f3acba3507f947e9ddeebe9bfea4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"larsbrinkhoff","id":775050,"avatar_url":"https://avatars.githubusercontent.com/u/775050?v=3","gravatar_id":"","url":"https://api.github.com/users/larsbrinkhoff","html_url":"https://github.com/larsbrinkhoff","followers_url":"https://api.github.com/users/larsbrinkhoff/followers","following_url":"https://api.github.com/users/larsbrinkhoff/following{/other_user}","gists_url":"https://api.github.com/users/larsbrinkhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/larsbrinkhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsbrinkhoff/subscriptions","organizations_url":"https://api.github.com/users/larsbrinkhoff/orgs","repos_url":"https://api.github.com/users/larsbrinkhoff/repos","events_url":"https://api.github.com/users/larsbrinkhoff/events{/privacy}","received_events_url":"https://api.github.com/users/larsbrinkhoff/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":4,"additions":64,"deletions":16,"changed_files":1}}