{"action":"created","issue":{"url":"https://api.github.com/repos/18F/github-dashing/issues/26","labels_url":"https://api.github.com/repos/18F/github-dashing/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/18F/github-dashing/issues/26/comments","events_url":"https://api.github.com/repos/18F/github-dashing/issues/26/events","html_url":"https://github.com/18F/github-dashing/pull/26","id":107586614,"number":26,"title":"Add CircleCI build status widget","user":{"login":"monfresh","id":811150,"avatar_url":"https://avatars.githubusercontent.com/u/811150?v=3","gravatar_id":"","url":"https://api.github.com/users/monfresh","html_url":"https://github.com/monfresh","followers_url":"https://api.github.com/users/monfresh/followers","following_url":"https://api.github.com/users/monfresh/following{/other_user}","gists_url":"https://api.github.com/users/monfresh/gists{/gist_id}","starred_url":"https://api.github.com/users/monfresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monfresh/subscriptions","organizations_url":"https://api.github.com/users/monfresh/orgs","repos_url":"https://api.github.com/users/monfresh/repos","events_url":"https://api.github.com/users/monfresh/events{/privacy}","received_events_url":"https://api.github.com/users/monfresh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-21T19:56:00Z","updated_at":"2015-09-22T02:22:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/18F/github-dashing/pulls/26","html_url":"https://github.com/18F/github-dashing/pull/26","diff_url":"https://github.com/18F/github-dashing/pull/26.diff","patch_url":"https://github.com/18F/github-dashing/pull/26.patch"},"body":"The Circle CI API does not currently provide a way to get a list of just\r\nthe active repos, so we have to use the GitHub API to get a list of all\r\nrepos that belong to an organization, then make a separate Circle API call for each one (over 300 for 18F), just to determine whether Circle CI has builds for that repo.\r\n\r\nIn order to minimize the amount of times we have to do this, I created a new job that runs once a day and stores this list in an env var, which can then be reused by the Circle CI widget, which runs every 5 minutes.\r\n\r\nI also did the same optimization for the list of GitHub org repos.\r\n\r\nTo support this new optimization, I adjusted the start time of each job so that it would allow enough time to pass for the env vars to get populated.\r\n\r\nCloses #14."},"comment":{"url":"https://api.github.com/repos/18F/github-dashing/issues/comments/142160653","html_url":"https://github.com/18F/github-dashing/pull/26#issuecomment-142160653","issue_url":"https://api.github.com/repos/18F/github-dashing/issues/26","id":142160653,"user":{"login":"monfresh","id":811150,"avatar_url":"https://avatars.githubusercontent.com/u/811150?v=3","gravatar_id":"","url":"https://api.github.com/users/monfresh","html_url":"https://github.com/monfresh","followers_url":"https://api.github.com/users/monfresh/followers","following_url":"https://api.github.com/users/monfresh/following{/other_user}","gists_url":"https://api.github.com/users/monfresh/gists{/gist_id}","starred_url":"https://api.github.com/users/monfresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monfresh/subscriptions","organizations_url":"https://api.github.com/users/monfresh/orgs","repos_url":"https://api.github.com/users/monfresh/repos","events_url":"https://api.github.com/users/monfresh/events{/privacy}","received_events_url":"https://api.github.com/users/monfresh/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T02:22:37Z","updated_at":"2015-09-22T02:22:37Z","body":"Alrighty. Tests have been written and we are green all around. Ready for review!\r\ncc @jessieay @mbland @arowla "}}