{"action":"created","comment":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/26058734","id":26058734,"diff_hunk":"@@ -592,12 +613,20 @@ def load_www(self, filename, config_dict):\n         allowed = set(['port', 'debug', 'json_cache_seconds',\n                        'rest_minimum_version', 'allowed_origins', 'jsonp',\n                        'plugins', 'auth', 'avatar_methods', 'logfileName',\n-                       'logRotateLength', 'maxRotatedFiles'])\n+                       'logRotateLength', 'maxRotatedFiles', 'versions'])\n         unknown = set(www_cfg.iterkeys()) - allowed\n         if unknown:\n             error(\"unknown www configuration parameter(s) %s\" %\n                   (', '.join(unknown),))\n \n+        if www_cfg.get('versions') is None:\n+            www_cfg['versions'] = {}\n+\n+        if not isinstance(www_cfg['versions'], dict):\n+            error(\"'versions' must be a dictionary\")\n+\n+        www_cfg['env_versions'] = self.getEnvironmentVersions()","path":"master/buildbot/config.py","position":47,"original_position":47,"commit_id":"f26b05250a61ee8cd77d73cad3e70086aec8f48c","original_commit_id":"f26b05250a61ee8cd77d73cad3e70086aec8f48c","user":{"login":"tardyp","id":109859,"avatar_url":"https://avatars.githubusercontent.com/u/109859?v=3","gravatar_id":"","url":"https://api.github.com/users/tardyp","html_url":"https://github.com/tardyp","followers_url":"https://api.github.com/users/tardyp/followers","following_url":"https://api.github.com/users/tardyp/following{/other_user}","gists_url":"https://api.github.com/users/tardyp/gists{/gist_id}","starred_url":"https://api.github.com/users/tardyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tardyp/subscriptions","organizations_url":"https://api.github.com/users/tardyp/orgs","repos_url":"https://api.github.com/users/tardyp/repos","events_url":"https://api.github.com/users/tardyp/events{/privacy}","received_events_url":"https://api.github.com/users/tardyp/received_events","type":"User","site_admin":false},"body":"Then we an forget about the dict, and rather use a list of tuples.\r\n\r\nWe an also use OrderedDict, but I think that will need some attention when serializing to json.\r\n","created_at":"2015-03-09T17:56:11Z","updated_at":"2015-03-09T17:56:11Z","html_url":"https://github.com/buildbot/buildbot/pull/1580#discussion_r26058734","pull_request_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1580","_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/26058734"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1580#discussion_r26058734"},"pull_request":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1580"}}},"pull_request":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/1580","id":30782007,"html_url":"https://github.com/buildbot/buildbot/pull/1580","diff_url":"https://github.com/buildbot/buildbot/pull/1580.diff","patch_url":"https://github.com/buildbot/buildbot/pull/1580.patch","issue_url":"https://api.github.com/repos/buildbot/buildbot/issues/1580","number":1580,"state":"open","locked":false,"title":"Issue 3175: Alow customization of versions info on the About page","user":{"login":"shanzi","id":557294,"avatar_url":"https://avatars.githubusercontent.com/u/557294?v=3","gravatar_id":"","url":"https://api.github.com/users/shanzi","html_url":"https://github.com/shanzi","followers_url":"https://api.github.com/users/shanzi/followers","following_url":"https://api.github.com/users/shanzi/following{/other_user}","gists_url":"https://api.github.com/users/shanzi/gists{/gist_id}","starred_url":"https://api.github.com/users/shanzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanzi/subscriptions","organizations_url":"https://api.github.com/users/shanzi/orgs","repos_url":"https://api.github.com/users/shanzi/repos","events_url":"https://api.github.com/users/shanzi/events{/privacy}","received_events_url":"https://api.github.com/users/shanzi/received_events","type":"User","site_admin":false},"body":"This pull request completed the task described in [\\#3175](http://trac.buildbot.net/ticket/3175).\r\n\r\nNow we can add user-defined versions information by adding a new value to `c['www']` with key named `versions`. The value should be a dictionary described the versions with key as the name of component and value as the the corresponding version. \r\n\r\nThe versions of buildbot, python and twisted are now automatically found by server in `config.py` instead of hard coding.\r\n\r\nThe results looks like:\r\n\r\n![custom_versions](https://cloud.githubusercontent.com/assets/557294/6560420/df401de2-c6c4-11e4-9752-81e246c2d219.png)\r\n\r\n","created_at":"2015-03-09T17:31:08Z","updated_at":"2015-03-09T17:56:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b610786f32b186e81716cc1c5e169cfd97e99913","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1580/commits","review_comments_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1580/comments","review_comment_url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildbot/buildbot/issues/1580/comments","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/f26b05250a61ee8cd77d73cad3e70086aec8f48c","head":{"label":"shanzi:about-page-versions","ref":"about-page-versions","sha":"f26b05250a61ee8cd77d73cad3e70086aec8f48c","user":{"login":"shanzi","id":557294,"avatar_url":"https://avatars.githubusercontent.com/u/557294?v=3","gravatar_id":"","url":"https://api.github.com/users/shanzi","html_url":"https://github.com/shanzi","followers_url":"https://api.github.com/users/shanzi/followers","following_url":"https://api.github.com/users/shanzi/following{/other_user}","gists_url":"https://api.github.com/users/shanzi/gists{/gist_id}","starred_url":"https://api.github.com/users/shanzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanzi/subscriptions","organizations_url":"https://api.github.com/users/shanzi/orgs","repos_url":"https://api.github.com/users/shanzi/repos","events_url":"https://api.github.com/users/shanzi/events{/privacy}","received_events_url":"https://api.github.com/users/shanzi/received_events","type":"User","site_admin":false},"repo":{"id":31756463,"name":"buildbot","full_name":"shanzi/buildbot","owner":{"login":"shanzi","id":557294,"avatar_url":"https://avatars.githubusercontent.com/u/557294?v=3","gravatar_id":"","url":"https://api.github.com/users/shanzi","html_url":"https://github.com/shanzi","followers_url":"https://api.github.com/users/shanzi/followers","following_url":"https://api.github.com/users/shanzi/following{/other_user}","gists_url":"https://api.github.com/users/shanzi/gists{/gist_id}","starred_url":"https://api.github.com/users/shanzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanzi/subscriptions","organizations_url":"https://api.github.com/users/shanzi/orgs","repos_url":"https://api.github.com/users/shanzi/repos","events_url":"https://api.github.com/users/shanzi/events{/privacy}","received_events_url":"https://api.github.com/users/shanzi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shanzi/buildbot","description":"Python-based continuous integration testing framework; send pull requests for your patches!","fork":true,"url":"https://api.github.com/repos/shanzi/buildbot","forks_url":"https://api.github.com/repos/shanzi/buildbot/forks","keys_url":"https://api.github.com/repos/shanzi/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shanzi/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shanzi/buildbot/teams","hooks_url":"https://api.github.com/repos/shanzi/buildbot/hooks","issue_events_url":"https://api.github.com/repos/shanzi/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/shanzi/buildbot/events","assignees_url":"https://api.github.com/repos/shanzi/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/shanzi/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/shanzi/buildbot/tags","blobs_url":"https://api.github.com/repos/shanzi/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shanzi/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shanzi/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/shanzi/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shanzi/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/shanzi/buildbot/languages","stargazers_url":"https://api.github.com/repos/shanzi/buildbot/stargazers","contributors_url":"https://api.github.com/repos/shanzi/buildbot/contributors","subscribers_url":"https://api.github.com/repos/shanzi/buildbot/subscribers","subscription_url":"https://api.github.com/repos/shanzi/buildbot/subscription","commits_url":"https://api.github.com/repos/shanzi/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/shanzi/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/shanzi/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/shanzi/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/shanzi/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/shanzi/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shanzi/buildbot/merges","archive_url":"https://api.github.com/repos/shanzi/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shanzi/buildbot/downloads","issues_url":"https://api.github.com/repos/shanzi/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/shanzi/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/shanzi/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/shanzi/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shanzi/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/shanzi/buildbot/releases{/id}","created_at":"2015-03-06T06:49:16Z","updated_at":"2015-03-06T06:49:21Z","pushed_at":"2015-03-09T17:09:30Z","git_url":"git://github.com/shanzi/buildbot.git","ssh_url":"git@github.com:shanzi/buildbot.git","clone_url":"https://github.com/shanzi/buildbot.git","svn_url":"https://github.com/shanzi/buildbot","homepage":"http://buildbot.net","size":49915,"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":"master"}},"base":{"label":"buildbot:master","ref":"master","sha":"8bbcdf68a2527f6dfce37bb05e5ce837db4ca181","user":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"repo":{"id":760165,"name":"buildbot","full_name":"buildbot/buildbot","owner":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildbot/buildbot","description":"Python-based continuous integration testing framework; send pull requests for your patches!","fork":false,"url":"https://api.github.com/repos/buildbot/buildbot","forks_url":"https://api.github.com/repos/buildbot/buildbot/forks","keys_url":"https://api.github.com/repos/buildbot/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildbot/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildbot/buildbot/teams","hooks_url":"https://api.github.com/repos/buildbot/buildbot/hooks","issue_events_url":"https://api.github.com/repos/buildbot/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/buildbot/buildbot/events","assignees_url":"https://api.github.com/repos/buildbot/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/buildbot/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/buildbot/buildbot/tags","blobs_url":"https://api.github.com/repos/buildbot/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildbot/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildbot/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildbot/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/buildbot/buildbot/languages","stargazers_url":"https://api.github.com/repos/buildbot/buildbot/stargazers","contributors_url":"https://api.github.com/repos/buildbot/buildbot/contributors","subscribers_url":"https://api.github.com/repos/buildbot/buildbot/subscribers","subscription_url":"https://api.github.com/repos/buildbot/buildbot/subscription","commits_url":"https://api.github.com/repos/buildbot/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildbot/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildbot/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildbot/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildbot/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/buildbot/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildbot/buildbot/merges","archive_url":"https://api.github.com/repos/buildbot/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildbot/buildbot/downloads","issues_url":"https://api.github.com/repos/buildbot/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/buildbot/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/buildbot/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/buildbot/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildbot/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/buildbot/buildbot/releases{/id}","created_at":"2010-07-06T17:56:53Z","updated_at":"2015-03-09T05:49:26Z","pushed_at":"2015-03-08T20:13:28Z","git_url":"git://github.com/buildbot/buildbot.git","ssh_url":"git@github.com:buildbot/buildbot.git","clone_url":"https://github.com/buildbot/buildbot.git","svn_url":"https://github.com/buildbot/buildbot","homepage":"http://buildbot.net","size":49915,"stargazers_count":1417,"watchers_count":1417,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":667,"mirror_url":null,"open_issues_count":21,"forks":667,"open_issues":21,"watchers":1417,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1580"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1580"},"issue":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1580"},"comments":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1580/comments"},"review_comments":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1580/comments"},"review_comment":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1580/commits"},"statuses":{"href":"https://api.github.com/repos/buildbot/buildbot/statuses/f26b05250a61ee8cd77d73cad3e70086aec8f48c"}}}}