{"action":"created","comment":{"url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/comments/76343480","id":76343480,"diff_hunk":"@@ -21,13 +21,48 @@ function progressbar(f)\n \treturn left .. right\n end\n \n+-- get flag arguments\n+local acceptedFlags = {\n+\t'-b' = 'branch',\n+\t'--branch' = 'branch',\n+\t'-t' = 'tag',\n+\t'--tag' = 'tag',\n+\t'-a' = 'auth',\n+\t'--auth' = 'auth'\n+}\n+\n+local findFlag = function(arg) return acceptedFlags[arg] end\n+\n+local passed = {...}\n+local args = {}\n+local flags = {}\n+local flagValue = ''\n+for k, arg in pairs(passed) do\n+\tlocal flagName = findFlag(arg)\n+\tif flagName and arg ~= flagValue then\n+\t\tflags[flagName] = passed[k + 1]\n+\t\tflagValue = flags[flagName]\n+\telseif arg ~= action and arg ~= flagValue then","path":"programs/github","position":34,"original_position":34,"commit_id":"03a2b915ba2b0e7d4c14ccde85bfa009059c75fe","original_commit_id":"03a2b915ba2b0e7d4c14ccde85bfa009059c75fe","user":{"login":"aaronmallen","id":931094,"avatar_url":"https://avatars.githubusercontent.com/u/931094?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronmallen","html_url":"https://github.com/aaronmallen","followers_url":"https://api.github.com/users/aaronmallen/followers","following_url":"https://api.github.com/users/aaronmallen/following{/other_user}","gists_url":"https://api.github.com/users/aaronmallen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronmallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronmallen/subscriptions","organizations_url":"https://api.github.com/users/aaronmallen/orgs","repos_url":"https://api.github.com/users/aaronmallen/repos","events_url":"https://api.github.com/users/aaronmallen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronmallen/received_events","type":"User","site_admin":false},"body":"I got it I'll just ignore the index as opposed to the value","created_at":"2016-08-25T23:28:45Z","updated_at":"2016-08-25T23:28:45Z","html_url":"https://github.com/eric-wieser/computercraft-github/pull/11#discussion_r76343480","pull_request_url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/comments/76343480"},"html":{"href":"https://github.com/eric-wieser/computercraft-github/pull/11#discussion_r76343480"},"pull_request":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11","id":82663527,"html_url":"https://github.com/eric-wieser/computercraft-github/pull/11","diff_url":"https://github.com/eric-wieser/computercraft-github/pull/11.diff","patch_url":"https://github.com/eric-wieser/computercraft-github/pull/11.patch","issue_url":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/11","number":11,"state":"open","locked":false,"title":"add support for authorized api access","user":{"login":"aaronmallen","id":931094,"avatar_url":"https://avatars.githubusercontent.com/u/931094?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronmallen","html_url":"https://github.com/aaronmallen","followers_url":"https://api.github.com/users/aaronmallen/followers","following_url":"https://api.github.com/users/aaronmallen/following{/other_user}","gists_url":"https://api.github.com/users/aaronmallen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronmallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronmallen/subscriptions","organizations_url":"https://api.github.com/users/aaronmallen/orgs","repos_url":"https://api.github.com/users/aaronmallen/repos","events_url":"https://api.github.com/users/aaronmallen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronmallen/received_events","type":"User","site_admin":false},"body":"### Added\r\n* support for authorized github api request.\r\n\r\n### Fixed\r\n* #8 Change branch syntax to match real git command.\r\n\r\nresolves #8","created_at":"2016-08-25T06:26:58Z","updated_at":"2016-08-25T23:28:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b17e9bddce85622810c5947851ee8e5824abe52","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11/commits","review_comments_url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11/comments","review_comment_url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/11/comments","statuses_url":"https://api.github.com/repos/eric-wieser/computercraft-github/statuses/03a2b915ba2b0e7d4c14ccde85bfa009059c75fe","head":{"label":"aaronmallen:support-auth","ref":"support-auth","sha":"03a2b915ba2b0e7d4c14ccde85bfa009059c75fe","user":{"login":"aaronmallen","id":931094,"avatar_url":"https://avatars.githubusercontent.com/u/931094?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronmallen","html_url":"https://github.com/aaronmallen","followers_url":"https://api.github.com/users/aaronmallen/followers","following_url":"https://api.github.com/users/aaronmallen/following{/other_user}","gists_url":"https://api.github.com/users/aaronmallen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronmallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronmallen/subscriptions","organizations_url":"https://api.github.com/users/aaronmallen/orgs","repos_url":"https://api.github.com/users/aaronmallen/repos","events_url":"https://api.github.com/users/aaronmallen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronmallen/received_events","type":"User","site_admin":false},"repo":{"id":66046068,"name":"computercraft-github","full_name":"aaronmallen/computercraft-github","owner":{"login":"aaronmallen","id":931094,"avatar_url":"https://avatars.githubusercontent.com/u/931094?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronmallen","html_url":"https://github.com/aaronmallen","followers_url":"https://api.github.com/users/aaronmallen/followers","following_url":"https://api.github.com/users/aaronmallen/following{/other_user}","gists_url":"https://api.github.com/users/aaronmallen/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronmallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronmallen/subscriptions","organizations_url":"https://api.github.com/users/aaronmallen/orgs","repos_url":"https://api.github.com/users/aaronmallen/repos","events_url":"https://api.github.com/users/aaronmallen/events{/privacy}","received_events_url":"https://api.github.com/users/aaronmallen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronmallen/computercraft-github","description":"A readonly github repository client for computercraft","fork":true,"url":"https://api.github.com/repos/aaronmallen/computercraft-github","forks_url":"https://api.github.com/repos/aaronmallen/computercraft-github/forks","keys_url":"https://api.github.com/repos/aaronmallen/computercraft-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronmallen/computercraft-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronmallen/computercraft-github/teams","hooks_url":"https://api.github.com/repos/aaronmallen/computercraft-github/hooks","issue_events_url":"https://api.github.com/repos/aaronmallen/computercraft-github/issues/events{/number}","events_url":"https://api.github.com/repos/aaronmallen/computercraft-github/events","assignees_url":"https://api.github.com/repos/aaronmallen/computercraft-github/assignees{/user}","branches_url":"https://api.github.com/repos/aaronmallen/computercraft-github/branches{/branch}","tags_url":"https://api.github.com/repos/aaronmallen/computercraft-github/tags","blobs_url":"https://api.github.com/repos/aaronmallen/computercraft-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronmallen/computercraft-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronmallen/computercraft-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronmallen/computercraft-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronmallen/computercraft-github/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronmallen/computercraft-github/languages","stargazers_url":"https://api.github.com/repos/aaronmallen/computercraft-github/stargazers","contributors_url":"https://api.github.com/repos/aaronmallen/computercraft-github/contributors","subscribers_url":"https://api.github.com/repos/aaronmallen/computercraft-github/subscribers","subscription_url":"https://api.github.com/repos/aaronmallen/computercraft-github/subscription","commits_url":"https://api.github.com/repos/aaronmallen/computercraft-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronmallen/computercraft-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronmallen/computercraft-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronmallen/computercraft-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronmallen/computercraft-github/contents/{+path}","compare_url":"https://api.github.com/repos/aaronmallen/computercraft-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronmallen/computercraft-github/merges","archive_url":"https://api.github.com/repos/aaronmallen/computercraft-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronmallen/computercraft-github/downloads","issues_url":"https://api.github.com/repos/aaronmallen/computercraft-github/issues{/number}","pulls_url":"https://api.github.com/repos/aaronmallen/computercraft-github/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronmallen/computercraft-github/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronmallen/computercraft-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronmallen/computercraft-github/labels{/name}","releases_url":"https://api.github.com/repos/aaronmallen/computercraft-github/releases{/id}","deployments_url":"https://api.github.com/repos/aaronmallen/computercraft-github/deployments","created_at":"2016-08-19T02:27:20Z","updated_at":"2016-08-18T07:20:10Z","pushed_at":"2016-08-25T21:09:18Z","git_url":"git://github.com/aaronmallen/computercraft-github.git","ssh_url":"git@github.com:aaronmallen/computercraft-github.git","clone_url":"https://github.com/aaronmallen/computercraft-github.git","svn_url":"https://github.com/aaronmallen/computercraft-github","homepage":null,"size":46,"stargazers_count":0,"watchers_count":0,"language":null,"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":"eric-wieser:master","ref":"master","sha":"9b4f116e83ec53854d208c11b253b7d4638458dc","user":{"login":"eric-wieser","id":425260,"avatar_url":"https://avatars.githubusercontent.com/u/425260?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-wieser","html_url":"https://github.com/eric-wieser","followers_url":"https://api.github.com/users/eric-wieser/followers","following_url":"https://api.github.com/users/eric-wieser/following{/other_user}","gists_url":"https://api.github.com/users/eric-wieser/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-wieser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-wieser/subscriptions","organizations_url":"https://api.github.com/users/eric-wieser/orgs","repos_url":"https://api.github.com/users/eric-wieser/repos","events_url":"https://api.github.com/users/eric-wieser/events{/privacy}","received_events_url":"https://api.github.com/users/eric-wieser/received_events","type":"User","site_admin":false},"repo":{"id":7527716,"name":"computercraft-github","full_name":"eric-wieser/computercraft-github","owner":{"login":"eric-wieser","id":425260,"avatar_url":"https://avatars.githubusercontent.com/u/425260?v=3","gravatar_id":"","url":"https://api.github.com/users/eric-wieser","html_url":"https://github.com/eric-wieser","followers_url":"https://api.github.com/users/eric-wieser/followers","following_url":"https://api.github.com/users/eric-wieser/following{/other_user}","gists_url":"https://api.github.com/users/eric-wieser/gists{/gist_id}","starred_url":"https://api.github.com/users/eric-wieser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eric-wieser/subscriptions","organizations_url":"https://api.github.com/users/eric-wieser/orgs","repos_url":"https://api.github.com/users/eric-wieser/repos","events_url":"https://api.github.com/users/eric-wieser/events{/privacy}","received_events_url":"https://api.github.com/users/eric-wieser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eric-wieser/computercraft-github","description":"A readonly github repository client for computercraft","fork":false,"url":"https://api.github.com/repos/eric-wieser/computercraft-github","forks_url":"https://api.github.com/repos/eric-wieser/computercraft-github/forks","keys_url":"https://api.github.com/repos/eric-wieser/computercraft-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eric-wieser/computercraft-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eric-wieser/computercraft-github/teams","hooks_url":"https://api.github.com/repos/eric-wieser/computercraft-github/hooks","issue_events_url":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/events{/number}","events_url":"https://api.github.com/repos/eric-wieser/computercraft-github/events","assignees_url":"https://api.github.com/repos/eric-wieser/computercraft-github/assignees{/user}","branches_url":"https://api.github.com/repos/eric-wieser/computercraft-github/branches{/branch}","tags_url":"https://api.github.com/repos/eric-wieser/computercraft-github/tags","blobs_url":"https://api.github.com/repos/eric-wieser/computercraft-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eric-wieser/computercraft-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eric-wieser/computercraft-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/eric-wieser/computercraft-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eric-wieser/computercraft-github/statuses/{sha}","languages_url":"https://api.github.com/repos/eric-wieser/computercraft-github/languages","stargazers_url":"https://api.github.com/repos/eric-wieser/computercraft-github/stargazers","contributors_url":"https://api.github.com/repos/eric-wieser/computercraft-github/contributors","subscribers_url":"https://api.github.com/repos/eric-wieser/computercraft-github/subscribers","subscription_url":"https://api.github.com/repos/eric-wieser/computercraft-github/subscription","commits_url":"https://api.github.com/repos/eric-wieser/computercraft-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/eric-wieser/computercraft-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/eric-wieser/computercraft-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/eric-wieser/computercraft-github/contents/{+path}","compare_url":"https://api.github.com/repos/eric-wieser/computercraft-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eric-wieser/computercraft-github/merges","archive_url":"https://api.github.com/repos/eric-wieser/computercraft-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eric-wieser/computercraft-github/downloads","issues_url":"https://api.github.com/repos/eric-wieser/computercraft-github/issues{/number}","pulls_url":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls{/number}","milestones_url":"https://api.github.com/repos/eric-wieser/computercraft-github/milestones{/number}","notifications_url":"https://api.github.com/repos/eric-wieser/computercraft-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eric-wieser/computercraft-github/labels{/name}","releases_url":"https://api.github.com/repos/eric-wieser/computercraft-github/releases{/id}","deployments_url":"https://api.github.com/repos/eric-wieser/computercraft-github/deployments","created_at":"2013-01-09T19:46:16Z","updated_at":"2016-08-18T07:20:10Z","pushed_at":"2016-08-25T21:09:18Z","git_url":"git://github.com/eric-wieser/computercraft-github.git","ssh_url":"git@github.com:eric-wieser/computercraft-github.git","clone_url":"https://github.com/eric-wieser/computercraft-github.git","svn_url":"https://github.com/eric-wieser/computercraft-github","homepage":null,"size":42,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11"},"html":{"href":"https://github.com/eric-wieser/computercraft-github/pull/11"},"issue":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/11"},"comments":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/eric-wieser/computercraft-github/statuses/03a2b915ba2b0e7d4c14ccde85bfa009059c75fe"}}}}
{"actor":{"display_login":"aaronmallen"}}