{"action":"created","comment":{"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments/29909687","id":29909687,"diff_hunk":"@@ -68,7 +68,7 @@ def find_incidents(start_date = nil, end_date = nil, query_input = nil)\n       end_date = Chronic.parse(end_date, :guess => false).last unless end_date.nil?\n \n       # If we couldn't parse the given date, use the last 24 hours.\n-      end_date = end_date.nil? ? Time.now.to_i : end_date.to_i\n+      end_date = (end_date.nil? || end_date.to_i > Time.now.to_i) ? Time.now.to_i : end_date.to_i","path":"lib/influx.rb","position":5,"original_position":5,"commit_id":"a9f70ac4df1f14a31f7f1ad76c797e27192f7456","original_commit_id":"a9f70ac4df1f14a31f7f1ad76c797e27192f7456","user":{"login":"nerdyness","id":696600,"avatar_url":"https://avatars.githubusercontent.com/u/696600?v=3","gravatar_id":"","url":"https://api.github.com/users/nerdyness","html_url":"https://github.com/nerdyness","followers_url":"https://api.github.com/users/nerdyness/followers","following_url":"https://api.github.com/users/nerdyness/following{/other_user}","gists_url":"https://api.github.com/users/nerdyness/gists{/gist_id}","starred_url":"https://api.github.com/users/nerdyness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerdyness/subscriptions","organizations_url":"https://api.github.com/users/nerdyness/orgs","repos_url":"https://api.github.com/users/nerdyness/repos","events_url":"https://api.github.com/users/nerdyness/events{/privacy}","received_events_url":"https://api.github.com/users/nerdyness/received_events","type":"User","site_admin":false},"body":"There is a lot happening in that line now. I'd be in favour of wrapping this over 2 lines so the code is more maintain and readable.","created_at":"2015-05-08T00:43:36Z","updated_at":"2015-05-08T00:43:36Z","html_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/17#discussion_r29909687","pull_request_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments/29909687"},"html":{"href":"https://github.com/bulletproofnetworks/pigeonhole/pull/17#discussion_r29909687"},"pull_request":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17","id":34967989,"html_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/17","diff_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/17.diff","patch_url":"https://github.com/bulletproofnetworks/pigeonhole/pull/17.patch","issue_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/17","number":17,"state":"open","locked":false,"title":"Prettification of new Index page","user":{"login":"glasnt","id":813732,"avatar_url":"https://avatars.githubusercontent.com/u/813732?v=3","gravatar_id":"","url":"https://api.github.com/users/glasnt","html_url":"https://github.com/glasnt","followers_url":"https://api.github.com/users/glasnt/followers","following_url":"https://api.github.com/users/glasnt/following{/other_user}","gists_url":"https://api.github.com/users/glasnt/gists{/gist_id}","starred_url":"https://api.github.com/users/glasnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasnt/subscriptions","organizations_url":"https://api.github.com/users/glasnt/orgs","repos_url":"https://api.github.com/users/glasnt/repos","events_url":"https://api.github.com/users/glasnt/events{/privacy}","received_events_url":"https://api.github.com/users/glasnt/received_events","type":"User","site_admin":false},"body":"I've done some tabular data generation and formatting, using partials and css; and I've also created the 'outstanding unacked/unresolved' listings. \r\n\r\nA note on the outstanding listings - based on the timescale of the page (24 hours) I've only set the range to be the last day. Ideally it would be nice to get all records without a time_to_ack or time_to_resolve, but this [doesn't appear to be possible in influx](http://stackoverflow.com/questions/30091980/select-from-influxdb-where-value-is-null). So for now, I'm pulling all records for the last 24 hours and then moving them to an array if their values are null. ","created_at":"2015-05-07T23:18:46Z","updated_at":"2015-05-08T00:43:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac0042d1d556c827a0022dc86fe02b7d51642201","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17/commits","review_comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17/comments","review_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/17/comments","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/a9f70ac4df1f14a31f7f1ad76c797e27192f7456","head":{"label":"bulletproofnetworks:index-page-pretty","ref":"index-page-pretty","sha":"a9f70ac4df1f14a31f7f1ad76c797e27192f7456","user":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":32840001,"name":"pigeonhole","full_name":"bulletproofnetworks/pigeonhole","owner":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bulletproofnetworks/pigeonhole","description":"A PagerDuty visualisation and categoration tool","fork":false,"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole","forks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/forks","keys_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/teams","hooks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/hooks","issue_events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/events{/number}","events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/events","assignees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/assignees{/user}","branches_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/branches{/branch}","tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/tags","blobs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/refs{/sha}","trees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/{sha}","languages_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/languages","stargazers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/stargazers","contributors_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contributors","subscribers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscribers","subscription_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscription","commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/commits{/sha}","git_commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/commits{/sha}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/comments{/number}","issue_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/comments{/number}","contents_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contents/{+path}","compare_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/merges","archive_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/downloads","issues_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues{/number}","pulls_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls{/number}","milestones_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/milestones{/number}","notifications_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/labels{/name}","releases_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/releases{/id}","created_at":"2015-03-25T03:18:05Z","updated_at":"2015-05-05T08:19:00Z","pushed_at":"2015-05-08T00:14:50Z","git_url":"git://github.com/bulletproofnetworks/pigeonhole.git","ssh_url":"git@github.com:bulletproofnetworks/pigeonhole.git","clone_url":"https://github.com/bulletproofnetworks/pigeonhole.git","svn_url":"https://github.com/bulletproofnetworks/pigeonhole","homepage":null,"size":1892,"stargazers_count":10,"watchers_count":10,"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":10,"default_branch":"master"}},"base":{"label":"bulletproofnetworks:master","ref":"master","sha":"bd32ee3e61a4e53c6de0ef79b7318992852a5039","user":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":32840001,"name":"pigeonhole","full_name":"bulletproofnetworks/pigeonhole","owner":{"login":"bulletproofnetworks","id":413815,"avatar_url":"https://avatars.githubusercontent.com/u/413815?v=3","gravatar_id":"","url":"https://api.github.com/users/bulletproofnetworks","html_url":"https://github.com/bulletproofnetworks","followers_url":"https://api.github.com/users/bulletproofnetworks/followers","following_url":"https://api.github.com/users/bulletproofnetworks/following{/other_user}","gists_url":"https://api.github.com/users/bulletproofnetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/bulletproofnetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulletproofnetworks/subscriptions","organizations_url":"https://api.github.com/users/bulletproofnetworks/orgs","repos_url":"https://api.github.com/users/bulletproofnetworks/repos","events_url":"https://api.github.com/users/bulletproofnetworks/events{/privacy}","received_events_url":"https://api.github.com/users/bulletproofnetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bulletproofnetworks/pigeonhole","description":"A PagerDuty visualisation and categoration tool","fork":false,"url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole","forks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/forks","keys_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/teams","hooks_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/hooks","issue_events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/events{/number}","events_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/events","assignees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/assignees{/user}","branches_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/branches{/branch}","tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/tags","blobs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/refs{/sha}","trees_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/{sha}","languages_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/languages","stargazers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/stargazers","contributors_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contributors","subscribers_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscribers","subscription_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/subscription","commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/commits{/sha}","git_commits_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/git/commits{/sha}","comments_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/comments{/number}","issue_comment_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/comments{/number}","contents_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/contents/{+path}","compare_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/merges","archive_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/downloads","issues_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues{/number}","pulls_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls{/number}","milestones_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/milestones{/number}","notifications_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/labels{/name}","releases_url":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/releases{/id}","created_at":"2015-03-25T03:18:05Z","updated_at":"2015-05-05T08:19:00Z","pushed_at":"2015-05-08T00:14:50Z","git_url":"git://github.com/bulletproofnetworks/pigeonhole.git","ssh_url":"git@github.com:bulletproofnetworks/pigeonhole.git","clone_url":"https://github.com/bulletproofnetworks/pigeonhole.git","svn_url":"https://github.com/bulletproofnetworks/pigeonhole","homepage":null,"size":1892,"stargazers_count":10,"watchers_count":10,"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":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17"},"html":{"href":"https://github.com/bulletproofnetworks/pigeonhole/pull/17"},"issue":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/17"},"comments":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/bulletproofnetworks/pigeonhole/statuses/a9f70ac4df1f14a31f7f1ad76c797e27192f7456"}}}}