{"action":"created","comment":{"url":"https://api.github.com/repos/fedora-infra/statscache/pulls/comments/35678605","id":35678605,"diff_hunk":"@@ -36,24 +28,36 @@ def main(name):\n     )\n \n \n+@app.route('/')\n+def index():\n+    \"\"\" Generate a JSON-P response with an index of plugins (as an array) \"\"\"\n+    return jsonp(json.dumps(plugins.keys()), 200)","path":"statscache/app.py","position":33,"original_position":33,"commit_id":"734203762d5ce62ba4e92e15e598eaad9776f6c8","original_commit_id":"734203762d5ce62ba4e92e15e598eaad9776f6c8","user":{"login":"ralphbean","id":331338,"avatar_url":"https://avatars.githubusercontent.com/u/331338?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbean","html_url":"https://github.com/ralphbean","followers_url":"https://api.github.com/users/ralphbean/followers","following_url":"https://api.github.com/users/ralphbean/following{/other_user}","gists_url":"https://api.github.com/users/ralphbean/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbean/subscriptions","organizations_url":"https://api.github.com/users/ralphbean/orgs","repos_url":"https://api.github.com/users/ralphbean/repos","events_url":"https://api.github.com/users/ralphbean/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbean/received_events","type":"User","site_admin":false},"body":":+1: that sounds good to me.  (That's how we did it for bodhi2 and I quite like it).  We could expose RSS for people who want to be notified when new plugins become available.","created_at":"2015-07-28T17:58:07Z","updated_at":"2015-07-28T17:58:07Z","html_url":"https://github.com/fedora-infra/statscache/pull/21#discussion_r35678605","pull_request_url":"https://api.github.com/repos/fedora-infra/statscache/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/comments/35678605"},"html":{"href":"https://github.com/fedora-infra/statscache/pull/21#discussion_r35678605"},"pull_request":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/fedora-infra/statscache/pulls/21","id":40963071,"html_url":"https://github.com/fedora-infra/statscache/pull/21","diff_url":"https://github.com/fedora-infra/statscache/pull/21.diff","patch_url":"https://github.com/fedora-infra/statscache/pull/21.patch","issue_url":"https://api.github.com/repos/fedora-infra/statscache/issues/21","number":21,"state":"open","locked":false,"title":"Serve a JSON-P list of plugins as root index","user":{"login":"yazman","id":4121048,"avatar_url":"https://avatars.githubusercontent.com/u/4121048?v=3","gravatar_id":"","url":"https://api.github.com/users/yazman","html_url":"https://github.com/yazman","followers_url":"https://api.github.com/users/yazman/followers","following_url":"https://api.github.com/users/yazman/following{/other_user}","gists_url":"https://api.github.com/users/yazman/gists{/gist_id}","starred_url":"https://api.github.com/users/yazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yazman/subscriptions","organizations_url":"https://api.github.com/users/yazman/orgs","repos_url":"https://api.github.com/users/yazman/repos","events_url":"https://api.github.com/users/yazman/events{/privacy}","received_events_url":"https://api.github.com/users/yazman/received_events","type":"User","site_admin":false},"body":"Generate a JSON-P response to requests at the root index (``/``) of the statscache web interface containing a simple list of the available plugins. Additionally separate out the common logic for preparing a JSON-P response into a small helper function. In the future, we may wish to also include whether each plugin has a layout attribute or what serialization formats are specifically supported.","created_at":"2015-07-27T23:59:44Z","updated_at":"2015-07-28T17:58:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2be713e0d2d6807a4faf3e17cd3d17ebd3babd7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fedora-infra/statscache/pulls/21/commits","review_comments_url":"https://api.github.com/repos/fedora-infra/statscache/pulls/21/comments","review_comment_url":"https://api.github.com/repos/fedora-infra/statscache/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedora-infra/statscache/issues/21/comments","statuses_url":"https://api.github.com/repos/fedora-infra/statscache/statuses/734203762d5ce62ba4e92e15e598eaad9776f6c8","head":{"label":"yazman:plugin_index","ref":"plugin_index","sha":"734203762d5ce62ba4e92e15e598eaad9776f6c8","user":{"login":"yazman","id":4121048,"avatar_url":"https://avatars.githubusercontent.com/u/4121048?v=3","gravatar_id":"","url":"https://api.github.com/users/yazman","html_url":"https://github.com/yazman","followers_url":"https://api.github.com/users/yazman/followers","following_url":"https://api.github.com/users/yazman/following{/other_user}","gists_url":"https://api.github.com/users/yazman/gists{/gist_id}","starred_url":"https://api.github.com/users/yazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yazman/subscriptions","organizations_url":"https://api.github.com/users/yazman/orgs","repos_url":"https://api.github.com/users/yazman/repos","events_url":"https://api.github.com/users/yazman/events{/privacy}","received_events_url":"https://api.github.com/users/yazman/received_events","type":"User","site_admin":false},"repo":{"id":37870874,"name":"statscache","full_name":"yazman/statscache","owner":{"login":"yazman","id":4121048,"avatar_url":"https://avatars.githubusercontent.com/u/4121048?v=3","gravatar_id":"","url":"https://api.github.com/users/yazman","html_url":"https://github.com/yazman","followers_url":"https://api.github.com/users/yazman/followers","following_url":"https://api.github.com/users/yazman/following{/other_user}","gists_url":"https://api.github.com/users/yazman/gists{/gist_id}","starred_url":"https://api.github.com/users/yazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yazman/subscriptions","organizations_url":"https://api.github.com/users/yazman/orgs","repos_url":"https://api.github.com/users/yazman/repos","events_url":"https://api.github.com/users/yazman/events{/privacy}","received_events_url":"https://api.github.com/users/yazman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yazman/statscache","description":"A daemon to build and keep fedmsg statistics","fork":true,"url":"https://api.github.com/repos/yazman/statscache","forks_url":"https://api.github.com/repos/yazman/statscache/forks","keys_url":"https://api.github.com/repos/yazman/statscache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yazman/statscache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yazman/statscache/teams","hooks_url":"https://api.github.com/repos/yazman/statscache/hooks","issue_events_url":"https://api.github.com/repos/yazman/statscache/issues/events{/number}","events_url":"https://api.github.com/repos/yazman/statscache/events","assignees_url":"https://api.github.com/repos/yazman/statscache/assignees{/user}","branches_url":"https://api.github.com/repos/yazman/statscache/branches{/branch}","tags_url":"https://api.github.com/repos/yazman/statscache/tags","blobs_url":"https://api.github.com/repos/yazman/statscache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yazman/statscache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yazman/statscache/git/refs{/sha}","trees_url":"https://api.github.com/repos/yazman/statscache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yazman/statscache/statuses/{sha}","languages_url":"https://api.github.com/repos/yazman/statscache/languages","stargazers_url":"https://api.github.com/repos/yazman/statscache/stargazers","contributors_url":"https://api.github.com/repos/yazman/statscache/contributors","subscribers_url":"https://api.github.com/repos/yazman/statscache/subscribers","subscription_url":"https://api.github.com/repos/yazman/statscache/subscription","commits_url":"https://api.github.com/repos/yazman/statscache/commits{/sha}","git_commits_url":"https://api.github.com/repos/yazman/statscache/git/commits{/sha}","comments_url":"https://api.github.com/repos/yazman/statscache/comments{/number}","issue_comment_url":"https://api.github.com/repos/yazman/statscache/issues/comments{/number}","contents_url":"https://api.github.com/repos/yazman/statscache/contents/{+path}","compare_url":"https://api.github.com/repos/yazman/statscache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yazman/statscache/merges","archive_url":"https://api.github.com/repos/yazman/statscache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yazman/statscache/downloads","issues_url":"https://api.github.com/repos/yazman/statscache/issues{/number}","pulls_url":"https://api.github.com/repos/yazman/statscache/pulls{/number}","milestones_url":"https://api.github.com/repos/yazman/statscache/milestones{/number}","notifications_url":"https://api.github.com/repos/yazman/statscache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yazman/statscache/labels{/name}","releases_url":"https://api.github.com/repos/yazman/statscache/releases{/id}","created_at":"2015-06-22T17:48:00Z","updated_at":"2015-06-22T17:48:00Z","pushed_at":"2015-07-28T00:02:27Z","git_url":"git://github.com/yazman/statscache.git","ssh_url":"git@github.com:yazman/statscache.git","clone_url":"https://github.com/yazman/statscache.git","svn_url":"https://github.com/yazman/statscache","homepage":"","size":1346,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"fedora-infra:develop","ref":"develop","sha":"66deaee019f336c1caf6b084a055ba730f3e0c52","user":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":33745687,"name":"statscache","full_name":"fedora-infra/statscache","owner":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedora-infra/statscache","description":"A daemon to build and keep fedmsg statistics","fork":false,"url":"https://api.github.com/repos/fedora-infra/statscache","forks_url":"https://api.github.com/repos/fedora-infra/statscache/forks","keys_url":"https://api.github.com/repos/fedora-infra/statscache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/statscache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/statscache/teams","hooks_url":"https://api.github.com/repos/fedora-infra/statscache/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/statscache/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/statscache/events","assignees_url":"https://api.github.com/repos/fedora-infra/statscache/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/statscache/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/statscache/tags","blobs_url":"https://api.github.com/repos/fedora-infra/statscache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/statscache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/statscache/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/statscache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/statscache/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/statscache/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/statscache/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/statscache/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/statscache/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/statscache/subscription","commits_url":"https://api.github.com/repos/fedora-infra/statscache/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/statscache/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/statscache/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/statscache/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/statscache/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/statscache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/statscache/merges","archive_url":"https://api.github.com/repos/fedora-infra/statscache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/statscache/downloads","issues_url":"https://api.github.com/repos/fedora-infra/statscache/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/statscache/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/statscache/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/statscache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/statscache/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/statscache/releases{/id}","created_at":"2015-04-10T19:03:38Z","updated_at":"2015-06-28T00:07:47Z","pushed_at":"2015-07-27T23:59:44Z","git_url":"git://github.com/fedora-infra/statscache.git","ssh_url":"git@github.com:fedora-infra/statscache.git","clone_url":"https://github.com/fedora-infra/statscache.git","svn_url":"https://github.com/fedora-infra/statscache","homepage":"","size":335,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/21"},"html":{"href":"https://github.com/fedora-infra/statscache/pull/21"},"issue":{"href":"https://api.github.com/repos/fedora-infra/statscache/issues/21"},"comments":{"href":"https://api.github.com/repos/fedora-infra/statscache/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedora-infra/statscache/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/fedora-infra/statscache/statuses/734203762d5ce62ba4e92e15e598eaad9776f6c8"}}}}