{"action":"created","comment":{"url":"https://api.github.com/repos/screwdriver-cd/client/pulls/comments/75730983","id":75730983,"diff_hunk":"@@ -0,0 +1,124 @@\n+package main\n+\n+import (\n+\t\"os\"\n+\t\"strings\"\n+\n+\tsd \"github.com/screwdriver-cd/client/client\"\n+\t\"github.com/screwdriver-cd/client/commands\"\n+\tfilter \"github.com/screwdriver-cd/client/commands/filters\"\n+\t\"github.com/urfave/cli\"\n+)\n+\n+// CreateApp creates an instance of the Screwdriver App\n+func CreateApp() *cli.App {\n+\tapp := cli.NewApp()\n+\tapp.Name = \"Screwdriver Client\"\n+\tapp.Usage = \"Continuous Delivery With Screwdriver\"\n+\tapp.Commands = []cli.Command{\n+\t\t{\n+\t\t\tName:  \"pipelines\",\n+\t\t\tUsage: \"Screwdriver Pipelines\",\n+\t\t\tSubcommands: []cli.Command{\n+\t\t\t\t{\n+\t\t\t\t\tName:  \"list\",\n+\t\t\t\t\tUsage: \"List all pipelines\",\n+\t\t\t\t\tAction: func(c *cli.Context) error {\n+\t\t\t\t\t\tresp, err := command.PipelinesList(sd.Default, c)\n+\t\t\t\t\t\tif err != nil {\n+\t\t\t\t\t\t\treturn cli.ShowSubcommandHelp(c)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tcommand.FormattedPrint(resp)\n+\t\t\t\t\t\treturn nil\n+\t\t\t\t\t},\n+\t\t\t\t\tArgsUsage: \"[pagination count] [pagination page]\",\n+\t\t\t\t},\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\tName:  \"jobs\",\n+\t\t\tUsage: \"Screwdriver Jobs\",\n+\t\t\tSubcommands: []cli.Command{\n+\t\t\t\t{\n+\t\t\t\t\tName:  \"list\",\n+\t\t\t\t\tUsage: \"List all jobs\",\n+\t\t\t\t\tFlags: []cli.Flag{\n+\t\t\t\t\t\tcli.StringFlag{\n+\t\t\t\t\t\t\tName:  \"pipelineID, p\",\n+\t\t\t\t\t\t\tUsage: \"Only show jobs for specified pipeline\",\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t\tAction: func(c *cli.Context) error {\n+\t\t\t\t\t\tresp, err := command.JobsList(sd.Default, c)\n+\t\t\t\t\t\tif err != nil {\n+\t\t\t\t\t\t\treturn cli.ShowSubcommandHelp(c)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tpipelineIDFlag := c.String(\"pipelineID\")\n+\t\t\t\t\t\tif strings.Compare(pipelineIDFlag, \"\") != 0 {\n+\t\t\t\t\t\t\tresp = filter.JobsFilterPipeline(resp, pipelineIDFlag)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tcommand.FormattedPrint(resp)\n+\t\t\t\t\t\treturn nil\n+\t\t\t\t\t},\n+\t\t\t\t\tArgsUsage: \"[pagination count] [pagination page]\",\n+\t\t\t\t},\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\tName:  \"builds\",\n+\t\t\tUsage: \"Screwdriver Builds\",\n+\t\t\tSubcommands: []cli.Command{\n+\t\t\t\t{\n+\t\t\t\t\tName:  \"list\",\n+\t\t\t\t\tUsage: \"List all builds\",\n+\t\t\t\t\tFlags: []cli.Flag{\n+\t\t\t\t\t\tcli.StringFlag{\n+\t\t\t\t\t\t\tName:  \"jobID, j\",\n+\t\t\t\t\t\t\tUsage: \"Filter builds by jobID\",\n+\t\t\t\t\t\t},\n+\t\t\t\t\t\tcli.StringFlag{\n+\t\t\t\t\t\t\tName:  \"status, s\",\n+\t\t\t\t\t\t\tUsage: \"Only show builds of a certain status\",\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t\tAction: func(c *cli.Context) error {\n+\t\t\t\t\t\tresp, err := command.BuildsList(sd.Default, c)\n+\t\t\t\t\t\tif err != nil {\n+\t\t\t\t\t\t\treturn cli.ShowSubcommandHelp(c)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tjobIDFlag := c.String(\"jobID\")\n+\t\t\t\t\t\tif strings.Compare(jobIDFlag, \"\") != 0 {\n+\t\t\t\t\t\t\tresp = filter.BuildsFilterJobs(resp, jobIDFlag)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tbuildStatusFlag := c.String(\"status\")\n+\t\t\t\t\t\tif strings.Compare(buildStatusFlag, \"\") != 0 {\n+\t\t\t\t\t\t\tresp = filter.BuildsFilterStatus(resp, buildStatusFlag)\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tcommand.FormattedPrint(resp)\n+\t\t\t\t\t\treturn nil\n+\t\t\t\t\t},\n+\t\t\t\t\tArgsUsage: \"[num elements] [page number]\",","path":"client.go","position":100,"original_position":100,"commit_id":"ee10884eca61fc6dfb9ead308a4e53222c49d743","original_commit_id":"ee10884eca61fc6dfb9ead308a4e53222c49d743","user":{"login":"nkatzman","id":3277004,"avatar_url":"https://avatars.githubusercontent.com/u/3277004?v=3","gravatar_id":"","url":"https://api.github.com/users/nkatzman","html_url":"https://github.com/nkatzman","followers_url":"https://api.github.com/users/nkatzman/followers","following_url":"https://api.github.com/users/nkatzman/following{/other_user}","gists_url":"https://api.github.com/users/nkatzman/gists{/gist_id}","starred_url":"https://api.github.com/users/nkatzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkatzman/subscriptions","organizations_url":"https://api.github.com/users/nkatzman/orgs","repos_url":"https://api.github.com/users/nkatzman/repos","events_url":"https://api.github.com/users/nkatzman/events{/privacy}","received_events_url":"https://api.github.com/users/nkatzman/received_events","type":"User","site_admin":false},"body":"`[pagination count] [pagination page]`","created_at":"2016-08-22T18:23:52Z","updated_at":"2016-08-22T18:23:52Z","html_url":"https://github.com/screwdriver-cd/client/pull/6#discussion_r75730983","pull_request_url":"https://api.github.com/repos/screwdriver-cd/client/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/comments/75730983"},"html":{"href":"https://github.com/screwdriver-cd/client/pull/6#discussion_r75730983"},"pull_request":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/client/pulls/6","id":82010477,"html_url":"https://github.com/screwdriver-cd/client/pull/6","diff_url":"https://github.com/screwdriver-cd/client/pull/6.diff","patch_url":"https://github.com/screwdriver-cd/client/pull/6.patch","issue_url":"https://api.github.com/repos/screwdriver-cd/client/issues/6","number":6,"state":"open","locked":false,"title":"Gogetters","user":{"login":"nicolaifsf","id":9099950,"avatar_url":"https://avatars.githubusercontent.com/u/9099950?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolaifsf","html_url":"https://github.com/nicolaifsf","followers_url":"https://api.github.com/users/nicolaifsf/followers","following_url":"https://api.github.com/users/nicolaifsf/following{/other_user}","gists_url":"https://api.github.com/users/nicolaifsf/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolaifsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolaifsf/subscriptions","organizations_url":"https://api.github.com/users/nicolaifsf/orgs","repos_url":"https://api.github.com/users/nicolaifsf/repos","events_url":"https://api.github.com/users/nicolaifsf/events{/privacy}","received_events_url":"https://api.github.com/users/nicolaifsf/received_events","type":"User","site_admin":false},"body":"Pipelines, Builds and Jobs GET Endpoints","created_at":"2016-08-19T16:43:37Z","updated_at":"2016-08-22T18:23:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"385ad12df3d49cacaf28ae7c085e891cdd11f0f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/screwdriver-cd/client/pulls/6/commits","review_comments_url":"https://api.github.com/repos/screwdriver-cd/client/pulls/6/comments","review_comment_url":"https://api.github.com/repos/screwdriver-cd/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/screwdriver-cd/client/issues/6/comments","statuses_url":"https://api.github.com/repos/screwdriver-cd/client/statuses/ee10884eca61fc6dfb9ead308a4e53222c49d743","head":{"label":"screwdriver-cd:gogetters","ref":"gogetters","sha":"ee10884eca61fc6dfb9ead308a4e53222c49d743","user":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars.githubusercontent.com/u/19417863?v=3","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":62348901,"name":"client","full_name":"screwdriver-cd/client","owner":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars.githubusercontent.com/u/19417863?v=3","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/screwdriver-cd/client","description":"Screwdriver CLI","fork":false,"url":"https://api.github.com/repos/screwdriver-cd/client","forks_url":"https://api.github.com/repos/screwdriver-cd/client/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/client/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/client/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/client/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/client/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/client/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/client/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/client/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/client/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/client/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/client/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/client/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/client/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/client/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/client/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/client/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/client/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/client/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/client/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/client/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/client/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/client/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/client/deployments","created_at":"2016-06-30T23:42:54Z","updated_at":"2016-07-01T07:08:31Z","pushed_at":"2016-08-21T07:43:33Z","git_url":"git://github.com/screwdriver-cd/client.git","ssh_url":"git@github.com:screwdriver-cd/client.git","clone_url":"https://github.com/screwdriver-cd/client.git","svn_url":"https://github.com/screwdriver-cd/client","homepage":null,"size":83,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"screwdriver-cd:master","ref":"master","sha":"75ed909abf9a3750d3c14791b38fc47abbfd7e35","user":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars.githubusercontent.com/u/19417863?v=3","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"repo":{"id":62348901,"name":"client","full_name":"screwdriver-cd/client","owner":{"login":"screwdriver-cd","id":19417863,"avatar_url":"https://avatars.githubusercontent.com/u/19417863?v=3","gravatar_id":"","url":"https://api.github.com/users/screwdriver-cd","html_url":"https://github.com/screwdriver-cd","followers_url":"https://api.github.com/users/screwdriver-cd/followers","following_url":"https://api.github.com/users/screwdriver-cd/following{/other_user}","gists_url":"https://api.github.com/users/screwdriver-cd/gists{/gist_id}","starred_url":"https://api.github.com/users/screwdriver-cd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/screwdriver-cd/subscriptions","organizations_url":"https://api.github.com/users/screwdriver-cd/orgs","repos_url":"https://api.github.com/users/screwdriver-cd/repos","events_url":"https://api.github.com/users/screwdriver-cd/events{/privacy}","received_events_url":"https://api.github.com/users/screwdriver-cd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/screwdriver-cd/client","description":"Screwdriver CLI","fork":false,"url":"https://api.github.com/repos/screwdriver-cd/client","forks_url":"https://api.github.com/repos/screwdriver-cd/client/forks","keys_url":"https://api.github.com/repos/screwdriver-cd/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/screwdriver-cd/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/screwdriver-cd/client/teams","hooks_url":"https://api.github.com/repos/screwdriver-cd/client/hooks","issue_events_url":"https://api.github.com/repos/screwdriver-cd/client/issues/events{/number}","events_url":"https://api.github.com/repos/screwdriver-cd/client/events","assignees_url":"https://api.github.com/repos/screwdriver-cd/client/assignees{/user}","branches_url":"https://api.github.com/repos/screwdriver-cd/client/branches{/branch}","tags_url":"https://api.github.com/repos/screwdriver-cd/client/tags","blobs_url":"https://api.github.com/repos/screwdriver-cd/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/screwdriver-cd/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/screwdriver-cd/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/screwdriver-cd/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/screwdriver-cd/client/statuses/{sha}","languages_url":"https://api.github.com/repos/screwdriver-cd/client/languages","stargazers_url":"https://api.github.com/repos/screwdriver-cd/client/stargazers","contributors_url":"https://api.github.com/repos/screwdriver-cd/client/contributors","subscribers_url":"https://api.github.com/repos/screwdriver-cd/client/subscribers","subscription_url":"https://api.github.com/repos/screwdriver-cd/client/subscription","commits_url":"https://api.github.com/repos/screwdriver-cd/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/screwdriver-cd/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/screwdriver-cd/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/screwdriver-cd/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/screwdriver-cd/client/contents/{+path}","compare_url":"https://api.github.com/repos/screwdriver-cd/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/screwdriver-cd/client/merges","archive_url":"https://api.github.com/repos/screwdriver-cd/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/screwdriver-cd/client/downloads","issues_url":"https://api.github.com/repos/screwdriver-cd/client/issues{/number}","pulls_url":"https://api.github.com/repos/screwdriver-cd/client/pulls{/number}","milestones_url":"https://api.github.com/repos/screwdriver-cd/client/milestones{/number}","notifications_url":"https://api.github.com/repos/screwdriver-cd/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/screwdriver-cd/client/labels{/name}","releases_url":"https://api.github.com/repos/screwdriver-cd/client/releases{/id}","deployments_url":"https://api.github.com/repos/screwdriver-cd/client/deployments","created_at":"2016-06-30T23:42:54Z","updated_at":"2016-07-01T07:08:31Z","pushed_at":"2016-08-21T07:43:33Z","git_url":"git://github.com/screwdriver-cd/client.git","ssh_url":"git@github.com:screwdriver-cd/client.git","clone_url":"https://github.com/screwdriver-cd/client.git","svn_url":"https://github.com/screwdriver-cd/client","homepage":null,"size":83,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/6"},"html":{"href":"https://github.com/screwdriver-cd/client/pull/6"},"issue":{"href":"https://api.github.com/repos/screwdriver-cd/client/issues/6"},"comments":{"href":"https://api.github.com/repos/screwdriver-cd/client/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/screwdriver-cd/client/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/screwdriver-cd/client/statuses/ee10884eca61fc6dfb9ead308a4e53222c49d743"}}}}
{"actor":{"display_login":"nkatzman"}}