GitHub PullRequestReviewCommentEvent at 2014-04-16 21:27:31
Repository: fleet
Actor: jonboulle
Payload: {"comment":{"url":"https://api.github.com/repos/coreos/fleet/pulls/comments/11708343","id":11708343,"diff_hunk":"@@ -0,0 +1,44 @@\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"os\"\n+\n+\t\"github.com/coreos/fleet/job\"\n+)\n+\n+var (\n+\tcmdLoadUnits = &Command{\n+\t\tName: \"load\",\n+\t\tRun:  runLoadUnits,\n+\t}\n+)\n+\n+func init() {\n+\tcmdLoadUnits.Flags.BoolVar(&sharedFlags.Sign, \"sign\", false, \"Sign unit file signatures and verify submitted units using local SSH identities.\")\n+\tcmdLoadUnits.Flags.IntVar(&sharedFlags.BlockAttempts, \"block-attempts\", 10, \"Wait until the jobs are loaded, performing up to N attempts before giving up.\")\n+\tcmdLoadUnits.Flags.BoolVar(&sharedFlags.NoBlock, \"no-block\", false, \"Do not wait until the jobs have been loaded before exiting.\")\n+}\n+\n+func runLoadUnits(args []string) (exit int) {\n+\tif err := lazyCreateJobs(args, sharedFlags.Sign); err != nil {\n+\t\tfmt.Fprintf(os.Stderr, \"%v\\n\", err)\n+\t\treturn 1\n+\t}\n+\n+\ttriggered, err := lazyLoadJobs(args)\n+\tif err != nil {\n+\t\tfmt.Fprintf(os.Stderr, \"%v\\n\", err)\n+\t\treturn 1\n+\t}\n+\n+\tif !sharedFlags.NoBlock {\n+\t\twaitForJobStates(triggered, job.JobStateLoaded, sharedFlags.BlockAttempts, os.Stdout)\n+\t} else {\n+\t\tfor _, jobName := range triggered {\n+\t\t\tfmt.Printf(\"Triggered job %s load\\n\", jobName)\n+\t\t}\n+\t}\n+\n+\treturn 0","path":"fleetctl/load.go","position":43,"original_position":43,"commit_id":"2f9757c8564a8a002286fa7da114483d2f401e4a","original_commit_id":"5dd17fe62b18961d71dca970ba17926ca3b1ec7f","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?","gravatar_id":"0f0b8b324fd58974000aacebb9b66c65","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"just \"return\" is more consistent with other commands now","created_at":"2014-04-16T21:27:31Z","updated_at":"2014-04-16T21:27:31Z","html_url":"https://github.com/coreos/fleet/pull/336#discussion_r11708343","pull_request_url":"https://api.github.com/repos/coreos/fleet/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/coreos/fleet/pulls/comments/11708343"},"html":{"href":"https://github.com/coreos/fleet/pull/336#discussion_r11708343"},"pull_request":{"href":"https://api.github.com/repos/coreos/fleet/pulls/336"}}}}