{"action":"created","comment":{"url":"https://api.github.com/repos/apex/apex/pulls/comments/50729197","id":50729197,"diff_hunk":"@@ -272,6 +276,28 @@ func (p *Project) Logs(s *session.Session, name string, filter string) (*logs.Lo\n \t\tFilterPattern: filter,\n \t}\n \n+\tvar parsedStartTime time.Time\n+\tvar parsedEndTime time.Time\n+\n+\tif duration != \"\" {\n+\t\tparsedDuration, err := time.ParseDuration(duration)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\t\tparsedEndTime = time.Now()\n+\t\tparsedStartTime = parsedEndTime.Add(-parsedDuration)\n+\t} else {\n+\t\tparsedStartTime = time.Now()\n+\t\tparsedEndTime = parsedStartTime.Add(-time.Duration(1) * time.Minute)","path":"project/project.go","position":43,"original_position":43,"commit_id":"ea7f1e232126ba5c9104e0cb809e32d4c341e836","original_commit_id":"ea7f1e232126ba5c9104e0cb809e32d4c341e836","user":{"login":"johannesboyne","id":623576,"avatar_url":"https://avatars.githubusercontent.com/u/623576?v=3","gravatar_id":"","url":"https://api.github.com/users/johannesboyne","html_url":"https://github.com/johannesboyne","followers_url":"https://api.github.com/users/johannesboyne/followers","following_url":"https://api.github.com/users/johannesboyne/following{/other_user}","gists_url":"https://api.github.com/users/johannesboyne/gists{/gist_id}","starred_url":"https://api.github.com/users/johannesboyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannesboyne/subscriptions","organizations_url":"https://api.github.com/users/johannesboyne/orgs","repos_url":"https://api.github.com/users/johannesboyne/repos","events_url":"https://api.github.com/users/johannesboyne/events{/privacy}","received_events_url":"https://api.github.com/users/johannesboyne/received_events","type":"User","site_admin":false},"body":"```\r\n   • START 18:50:58.545935649 +0100 CET\r\n   • END   18:49:58.545935649 +0100 CET\r\n```","created_at":"2016-01-25T17:53:17Z","updated_at":"2016-01-25T17:53:17Z","html_url":"https://github.com/apex/apex/pull/146#discussion_r50729197","pull_request_url":"https://api.github.com/repos/apex/apex/pulls/146","_links":{"self":{"href":"https://api.github.com/repos/apex/apex/pulls/comments/50729197"},"html":{"href":"https://github.com/apex/apex/pull/146#discussion_r50729197"},"pull_request":{"href":"https://api.github.com/repos/apex/apex/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/apex/apex/pulls/146","id":57104252,"html_url":"https://github.com/apex/apex/pull/146","diff_url":"https://github.com/apex/apex/pull/146.diff","patch_url":"https://github.com/apex/apex/pull/146.patch","issue_url":"https://api.github.com/repos/apex/apex/issues/146","number":146,"state":"open","locked":false,"title":"Add support for specifying a duration for the logs cmd","user":{"login":"johannesboyne","id":623576,"avatar_url":"https://avatars.githubusercontent.com/u/623576?v=3","gravatar_id":"","url":"https://api.github.com/users/johannesboyne","html_url":"https://github.com/johannesboyne","followers_url":"https://api.github.com/users/johannesboyne/followers","following_url":"https://api.github.com/users/johannesboyne/following{/other_user}","gists_url":"https://api.github.com/users/johannesboyne/gists{/gist_id}","starred_url":"https://api.github.com/users/johannesboyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannesboyne/subscriptions","organizations_url":"https://api.github.com/users/johannesboyne/orgs","repos_url":"https://api.github.com/users/johannesboyne/repos","events_url":"https://api.github.com/users/johannesboyne/events{/privacy}","received_events_url":"https://api.github.com/users/johannesboyne/received_events","type":"User","site_admin":false},"body":"closes #136 \r\n\r\nFeedback is much appreciated.","created_at":"2016-01-25T17:39:44Z","updated_at":"2016-01-25T17:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e00167a70d3e99002848bc616a4c4be4b00e1e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apex/apex/pulls/146/commits","review_comments_url":"https://api.github.com/repos/apex/apex/pulls/146/comments","review_comment_url":"https://api.github.com/repos/apex/apex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apex/apex/issues/146/comments","statuses_url":"https://api.github.com/repos/apex/apex/statuses/ea7f1e232126ba5c9104e0cb809e32d4c341e836","head":{"label":"johannesboyne:add_log_duration","ref":"add_log_duration","sha":"ea7f1e232126ba5c9104e0cb809e32d4c341e836","user":{"login":"johannesboyne","id":623576,"avatar_url":"https://avatars.githubusercontent.com/u/623576?v=3","gravatar_id":"","url":"https://api.github.com/users/johannesboyne","html_url":"https://github.com/johannesboyne","followers_url":"https://api.github.com/users/johannesboyne/followers","following_url":"https://api.github.com/users/johannesboyne/following{/other_user}","gists_url":"https://api.github.com/users/johannesboyne/gists{/gist_id}","starred_url":"https://api.github.com/users/johannesboyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannesboyne/subscriptions","organizations_url":"https://api.github.com/users/johannesboyne/orgs","repos_url":"https://api.github.com/users/johannesboyne/repos","events_url":"https://api.github.com/users/johannesboyne/events{/privacy}","received_events_url":"https://api.github.com/users/johannesboyne/received_events","type":"User","site_admin":false},"repo":{"id":49898423,"name":"apex","full_name":"johannesboyne/apex","owner":{"login":"johannesboyne","id":623576,"avatar_url":"https://avatars.githubusercontent.com/u/623576?v=3","gravatar_id":"","url":"https://api.github.com/users/johannesboyne","html_url":"https://github.com/johannesboyne","followers_url":"https://api.github.com/users/johannesboyne/followers","following_url":"https://api.github.com/users/johannesboyne/following{/other_user}","gists_url":"https://api.github.com/users/johannesboyne/gists{/gist_id}","starred_url":"https://api.github.com/users/johannesboyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannesboyne/subscriptions","organizations_url":"https://api.github.com/users/johannesboyne/orgs","repos_url":"https://api.github.com/users/johannesboyne/repos","events_url":"https://api.github.com/users/johannesboyne/events{/privacy}","received_events_url":"https://api.github.com/users/johannesboyne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johannesboyne/apex","description":"Minimal AWS Lambda function manager with Go support.","fork":true,"url":"https://api.github.com/repos/johannesboyne/apex","forks_url":"https://api.github.com/repos/johannesboyne/apex/forks","keys_url":"https://api.github.com/repos/johannesboyne/apex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johannesboyne/apex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johannesboyne/apex/teams","hooks_url":"https://api.github.com/repos/johannesboyne/apex/hooks","issue_events_url":"https://api.github.com/repos/johannesboyne/apex/issues/events{/number}","events_url":"https://api.github.com/repos/johannesboyne/apex/events","assignees_url":"https://api.github.com/repos/johannesboyne/apex/assignees{/user}","branches_url":"https://api.github.com/repos/johannesboyne/apex/branches{/branch}","tags_url":"https://api.github.com/repos/johannesboyne/apex/tags","blobs_url":"https://api.github.com/repos/johannesboyne/apex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johannesboyne/apex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johannesboyne/apex/git/refs{/sha}","trees_url":"https://api.github.com/repos/johannesboyne/apex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johannesboyne/apex/statuses/{sha}","languages_url":"https://api.github.com/repos/johannesboyne/apex/languages","stargazers_url":"https://api.github.com/repos/johannesboyne/apex/stargazers","contributors_url":"https://api.github.com/repos/johannesboyne/apex/contributors","subscribers_url":"https://api.github.com/repos/johannesboyne/apex/subscribers","subscription_url":"https://api.github.com/repos/johannesboyne/apex/subscription","commits_url":"https://api.github.com/repos/johannesboyne/apex/commits{/sha}","git_commits_url":"https://api.github.com/repos/johannesboyne/apex/git/commits{/sha}","comments_url":"https://api.github.com/repos/johannesboyne/apex/comments{/number}","issue_comment_url":"https://api.github.com/repos/johannesboyne/apex/issues/comments{/number}","contents_url":"https://api.github.com/repos/johannesboyne/apex/contents/{+path}","compare_url":"https://api.github.com/repos/johannesboyne/apex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johannesboyne/apex/merges","archive_url":"https://api.github.com/repos/johannesboyne/apex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johannesboyne/apex/downloads","issues_url":"https://api.github.com/repos/johannesboyne/apex/issues{/number}","pulls_url":"https://api.github.com/repos/johannesboyne/apex/pulls{/number}","milestones_url":"https://api.github.com/repos/johannesboyne/apex/milestones{/number}","notifications_url":"https://api.github.com/repos/johannesboyne/apex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johannesboyne/apex/labels{/name}","releases_url":"https://api.github.com/repos/johannesboyne/apex/releases{/id}","deployments_url":"https://api.github.com/repos/johannesboyne/apex/deployments","created_at":"2016-01-18T19:05:11Z","updated_at":"2016-01-18T19:05:12Z","pushed_at":"2016-01-25T17:37:41Z","git_url":"git://github.com/johannesboyne/apex.git","ssh_url":"git@github.com:johannesboyne/apex.git","clone_url":"https://github.com/johannesboyne/apex.git","svn_url":"https://github.com/johannesboyne/apex","homepage":"","size":850,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"apex:master","ref":"master","sha":"43c16c04db772a4fb7106b3d989c2bb3819465fb","user":{"login":"apex","id":10543471,"avatar_url":"https://avatars.githubusercontent.com/u/10543471?v=3","gravatar_id":"","url":"https://api.github.com/users/apex","html_url":"https://github.com/apex","followers_url":"https://api.github.com/users/apex/followers","following_url":"https://api.github.com/users/apex/following{/other_user}","gists_url":"https://api.github.com/users/apex/gists{/gist_id}","starred_url":"https://api.github.com/users/apex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apex/subscriptions","organizations_url":"https://api.github.com/users/apex/orgs","repos_url":"https://api.github.com/users/apex/repos","events_url":"https://api.github.com/users/apex/events{/privacy}","received_events_url":"https://api.github.com/users/apex/received_events","type":"Organization","site_admin":false},"repo":{"id":48301282,"name":"apex","full_name":"apex/apex","owner":{"login":"apex","id":10543471,"avatar_url":"https://avatars.githubusercontent.com/u/10543471?v=3","gravatar_id":"","url":"https://api.github.com/users/apex","html_url":"https://github.com/apex","followers_url":"https://api.github.com/users/apex/followers","following_url":"https://api.github.com/users/apex/following{/other_user}","gists_url":"https://api.github.com/users/apex/gists{/gist_id}","starred_url":"https://api.github.com/users/apex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apex/subscriptions","organizations_url":"https://api.github.com/users/apex/orgs","repos_url":"https://api.github.com/users/apex/repos","events_url":"https://api.github.com/users/apex/events{/privacy}","received_events_url":"https://api.github.com/users/apex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apex/apex","description":"Minimal AWS Lambda function manager with Go support.","fork":false,"url":"https://api.github.com/repos/apex/apex","forks_url":"https://api.github.com/repos/apex/apex/forks","keys_url":"https://api.github.com/repos/apex/apex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apex/apex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apex/apex/teams","hooks_url":"https://api.github.com/repos/apex/apex/hooks","issue_events_url":"https://api.github.com/repos/apex/apex/issues/events{/number}","events_url":"https://api.github.com/repos/apex/apex/events","assignees_url":"https://api.github.com/repos/apex/apex/assignees{/user}","branches_url":"https://api.github.com/repos/apex/apex/branches{/branch}","tags_url":"https://api.github.com/repos/apex/apex/tags","blobs_url":"https://api.github.com/repos/apex/apex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apex/apex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apex/apex/git/refs{/sha}","trees_url":"https://api.github.com/repos/apex/apex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apex/apex/statuses/{sha}","languages_url":"https://api.github.com/repos/apex/apex/languages","stargazers_url":"https://api.github.com/repos/apex/apex/stargazers","contributors_url":"https://api.github.com/repos/apex/apex/contributors","subscribers_url":"https://api.github.com/repos/apex/apex/subscribers","subscription_url":"https://api.github.com/repos/apex/apex/subscription","commits_url":"https://api.github.com/repos/apex/apex/commits{/sha}","git_commits_url":"https://api.github.com/repos/apex/apex/git/commits{/sha}","comments_url":"https://api.github.com/repos/apex/apex/comments{/number}","issue_comment_url":"https://api.github.com/repos/apex/apex/issues/comments{/number}","contents_url":"https://api.github.com/repos/apex/apex/contents/{+path}","compare_url":"https://api.github.com/repos/apex/apex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apex/apex/merges","archive_url":"https://api.github.com/repos/apex/apex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apex/apex/downloads","issues_url":"https://api.github.com/repos/apex/apex/issues{/number}","pulls_url":"https://api.github.com/repos/apex/apex/pulls{/number}","milestones_url":"https://api.github.com/repos/apex/apex/milestones{/number}","notifications_url":"https://api.github.com/repos/apex/apex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apex/apex/labels{/name}","releases_url":"https://api.github.com/repos/apex/apex/releases{/id}","deployments_url":"https://api.github.com/repos/apex/apex/deployments","created_at":"2015-12-19T23:54:31Z","updated_at":"2016-01-25T16:57:05Z","pushed_at":"2016-01-25T17:39:44Z","git_url":"git://github.com/apex/apex.git","ssh_url":"git@github.com:apex/apex.git","clone_url":"https://github.com/apex/apex.git","svn_url":"https://github.com/apex/apex","homepage":"","size":2529,"stargazers_count":1588,"watchers_count":1588,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":41,"forks":40,"open_issues":41,"watchers":1588,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apex/apex/pulls/146"},"html":{"href":"https://github.com/apex/apex/pull/146"},"issue":{"href":"https://api.github.com/repos/apex/apex/issues/146"},"comments":{"href":"https://api.github.com/repos/apex/apex/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/apex/apex/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/apex/apex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apex/apex/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/apex/apex/statuses/ea7f1e232126ba5c9104e0cb809e32d4c341e836"}}}}