{"action":"created","comment":{"url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/comments/173187832","pull_request_review_id":102334622,"id":173187832,"diff_hunk":"@@ -1699,15 +1699,27 @@ def listRepos(self, repos=None, content=False, history=False, labels=False, stri\n                         clean.sort()\n                         continue\n                     for manifest in r['manifests'].keys():\n+                        sver = r['manifests'][manifest].get('schema_version', None)\n+                        if sver:\n+                            manifestpath = '%s/%s' % (sver, manifest)","path":"dockpulp/__init__.py","position":6,"original_position":6,"commit_id":"ad2ef9574311ba5f9c0ef183a891548cb2cf6103","original_commit_id":"ad2ef9574311ba5f9c0ef183a891548cb2cf6103","user":{"login":"twaugh","id":6985468,"avatar_url":"https://avatars1.githubusercontent.com/u/6985468?v=4","gravatar_id":"","url":"https://api.github.com/users/twaugh","html_url":"https://github.com/twaugh","followers_url":"https://api.github.com/users/twaugh/followers","following_url":"https://api.github.com/users/twaugh/following{/other_user}","gists_url":"https://api.github.com/users/twaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/twaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twaugh/subscriptions","organizations_url":"https://api.github.com/users/twaugh/orgs","repos_url":"https://api.github.com/users/twaugh/repos","events_url":"https://api.github.com/users/twaugh/events{/privacy}","received_events_url":"https://api.github.com/users/twaugh/received_events","type":"User","site_admin":false},"body":"There are lots of lines not covered by unit tests. We can reduce that, and reduce repetition, by re-writing this slightly:\r\n```\r\nmanifestpaths = [manifest]\r\nif sver:\r\n    # Try new path first, then fall back to old path\r\n    manifestpaths.insert(0, '%s/%s' % (sver, manifest))\r\nlast_attempt = len(manifestpaths) - 1\r\nfor attempt, manifestpath in enumerate(manifestpaths):\r\n    try:\r\n        data = self._get(... % manifestpath)\r\n    except errors.DockPulpError:\r\n        # Any more to try?\r\n        if attempt < last_attempt:\r\n            continue\r\n        log.warning(...)\r\n        ...\r\n```\r\nWhat do you think?","created_at":"2018-03-08T15:15:54Z","updated_at":"2018-03-08T15:15:54Z","html_url":"https://github.com/release-engineering/dockpulp/pull/171#discussion_r173187832","pull_request_url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/comments/173187832"},"html":{"href":"https://github.com/release-engineering/dockpulp/pull/171#discussion_r173187832"},"pull_request":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171"}}},"pull_request":{"url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171","id":172598870,"html_url":"https://github.com/release-engineering/dockpulp/pull/171","diff_url":"https://github.com/release-engineering/dockpulp/pull/171.diff","patch_url":"https://github.com/release-engineering/dockpulp/pull/171.patch","issue_url":"https://api.github.com/repos/release-engineering/dockpulp/issues/171","number":171,"state":"open","locked":false,"title":"Fixed bug with schema 2 history output","user":{"login":"breillyr","id":14238759,"avatar_url":"https://avatars0.githubusercontent.com/u/14238759?v=4","gravatar_id":"","url":"https://api.github.com/users/breillyr","html_url":"https://github.com/breillyr","followers_url":"https://api.github.com/users/breillyr/followers","following_url":"https://api.github.com/users/breillyr/following{/other_user}","gists_url":"https://api.github.com/users/breillyr/gists{/gist_id}","starred_url":"https://api.github.com/users/breillyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breillyr/subscriptions","organizations_url":"https://api.github.com/users/breillyr/orgs","repos_url":"https://api.github.com/users/breillyr/repos","events_url":"https://api.github.com/users/breillyr/events{/privacy}","received_events_url":"https://api.github.com/users/breillyr/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-02T20:37:43Z","updated_at":"2018-03-08T15:15:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a2ada949c27c2c5609d1165452efeda837152a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171/commits","review_comments_url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171/comments","review_comment_url":"https://api.github.com/repos/release-engineering/dockpulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/release-engineering/dockpulp/issues/171/comments","statuses_url":"https://api.github.com/repos/release-engineering/dockpulp/statuses/ad2ef9574311ba5f9c0ef183a891548cb2cf6103","head":{"label":"breillyr:manifestbug-5224","ref":"manifestbug-5224","sha":"ad2ef9574311ba5f9c0ef183a891548cb2cf6103","user":{"login":"breillyr","id":14238759,"avatar_url":"https://avatars0.githubusercontent.com/u/14238759?v=4","gravatar_id":"","url":"https://api.github.com/users/breillyr","html_url":"https://github.com/breillyr","followers_url":"https://api.github.com/users/breillyr/followers","following_url":"https://api.github.com/users/breillyr/following{/other_user}","gists_url":"https://api.github.com/users/breillyr/gists{/gist_id}","starred_url":"https://api.github.com/users/breillyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breillyr/subscriptions","organizations_url":"https://api.github.com/users/breillyr/orgs","repos_url":"https://api.github.com/users/breillyr/repos","events_url":"https://api.github.com/users/breillyr/events{/privacy}","received_events_url":"https://api.github.com/users/breillyr/received_events","type":"User","site_admin":false},"repo":{"id":57329234,"name":"dockpulp","full_name":"breillyr/dockpulp","owner":{"login":"breillyr","id":14238759,"avatar_url":"https://avatars0.githubusercontent.com/u/14238759?v=4","gravatar_id":"","url":"https://api.github.com/users/breillyr","html_url":"https://github.com/breillyr","followers_url":"https://api.github.com/users/breillyr/followers","following_url":"https://api.github.com/users/breillyr/following{/other_user}","gists_url":"https://api.github.com/users/breillyr/gists{/gist_id}","starred_url":"https://api.github.com/users/breillyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breillyr/subscriptions","organizations_url":"https://api.github.com/users/breillyr/orgs","repos_url":"https://api.github.com/users/breillyr/repos","events_url":"https://api.github.com/users/breillyr/events{/privacy}","received_events_url":"https://api.github.com/users/breillyr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/breillyr/dockpulp","description":"ReST API Client to Pulp for manipulating docker images","fork":true,"url":"https://api.github.com/repos/breillyr/dockpulp","forks_url":"https://api.github.com/repos/breillyr/dockpulp/forks","keys_url":"https://api.github.com/repos/breillyr/dockpulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/breillyr/dockpulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/breillyr/dockpulp/teams","hooks_url":"https://api.github.com/repos/breillyr/dockpulp/hooks","issue_events_url":"https://api.github.com/repos/breillyr/dockpulp/issues/events{/number}","events_url":"https://api.github.com/repos/breillyr/dockpulp/events","assignees_url":"https://api.github.com/repos/breillyr/dockpulp/assignees{/user}","branches_url":"https://api.github.com/repos/breillyr/dockpulp/branches{/branch}","tags_url":"https://api.github.com/repos/breillyr/dockpulp/tags","blobs_url":"https://api.github.com/repos/breillyr/dockpulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/breillyr/dockpulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/breillyr/dockpulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/breillyr/dockpulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/breillyr/dockpulp/statuses/{sha}","languages_url":"https://api.github.com/repos/breillyr/dockpulp/languages","stargazers_url":"https://api.github.com/repos/breillyr/dockpulp/stargazers","contributors_url":"https://api.github.com/repos/breillyr/dockpulp/contributors","subscribers_url":"https://api.github.com/repos/breillyr/dockpulp/subscribers","subscription_url":"https://api.github.com/repos/breillyr/dockpulp/subscription","commits_url":"https://api.github.com/repos/breillyr/dockpulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/breillyr/dockpulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/breillyr/dockpulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/breillyr/dockpulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/breillyr/dockpulp/contents/{+path}","compare_url":"https://api.github.com/repos/breillyr/dockpulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/breillyr/dockpulp/merges","archive_url":"https://api.github.com/repos/breillyr/dockpulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/breillyr/dockpulp/downloads","issues_url":"https://api.github.com/repos/breillyr/dockpulp/issues{/number}","pulls_url":"https://api.github.com/repos/breillyr/dockpulp/pulls{/number}","milestones_url":"https://api.github.com/repos/breillyr/dockpulp/milestones{/number}","notifications_url":"https://api.github.com/repos/breillyr/dockpulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/breillyr/dockpulp/labels{/name}","releases_url":"https://api.github.com/repos/breillyr/dockpulp/releases{/id}","deployments_url":"https://api.github.com/repos/breillyr/dockpulp/deployments","created_at":"2016-04-28T19:45:42Z","updated_at":"2016-04-28T19:45:43Z","pushed_at":"2018-03-07T21:35:08Z","git_url":"git://github.com/breillyr/dockpulp.git","ssh_url":"git@github.com:breillyr/dockpulp.git","clone_url":"https://github.com/breillyr/dockpulp.git","svn_url":"https://github.com/breillyr/dockpulp","homepage":null,"size":700,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"release-engineering:master","ref":"master","sha":"0a316ea0d9bf9017570697f722e6861426fe0ea6","user":{"login":"release-engineering","id":9591189,"avatar_url":"https://avatars3.githubusercontent.com/u/9591189?v=4","gravatar_id":"","url":"https://api.github.com/users/release-engineering","html_url":"https://github.com/release-engineering","followers_url":"https://api.github.com/users/release-engineering/followers","following_url":"https://api.github.com/users/release-engineering/following{/other_user}","gists_url":"https://api.github.com/users/release-engineering/gists{/gist_id}","starred_url":"https://api.github.com/users/release-engineering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-engineering/subscriptions","organizations_url":"https://api.github.com/users/release-engineering/orgs","repos_url":"https://api.github.com/users/release-engineering/repos","events_url":"https://api.github.com/users/release-engineering/events{/privacy}","received_events_url":"https://api.github.com/users/release-engineering/received_events","type":"Organization","site_admin":false},"repo":{"id":36458026,"name":"dockpulp","full_name":"release-engineering/dockpulp","owner":{"login":"release-engineering","id":9591189,"avatar_url":"https://avatars3.githubusercontent.com/u/9591189?v=4","gravatar_id":"","url":"https://api.github.com/users/release-engineering","html_url":"https://github.com/release-engineering","followers_url":"https://api.github.com/users/release-engineering/followers","following_url":"https://api.github.com/users/release-engineering/following{/other_user}","gists_url":"https://api.github.com/users/release-engineering/gists{/gist_id}","starred_url":"https://api.github.com/users/release-engineering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-engineering/subscriptions","organizations_url":"https://api.github.com/users/release-engineering/orgs","repos_url":"https://api.github.com/users/release-engineering/repos","events_url":"https://api.github.com/users/release-engineering/events{/privacy}","received_events_url":"https://api.github.com/users/release-engineering/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/release-engineering/dockpulp","description":"ReST API Client to Pulp for manipulating docker images","fork":false,"url":"https://api.github.com/repos/release-engineering/dockpulp","forks_url":"https://api.github.com/repos/release-engineering/dockpulp/forks","keys_url":"https://api.github.com/repos/release-engineering/dockpulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/release-engineering/dockpulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/release-engineering/dockpulp/teams","hooks_url":"https://api.github.com/repos/release-engineering/dockpulp/hooks","issue_events_url":"https://api.github.com/repos/release-engineering/dockpulp/issues/events{/number}","events_url":"https://api.github.com/repos/release-engineering/dockpulp/events","assignees_url":"https://api.github.com/repos/release-engineering/dockpulp/assignees{/user}","branches_url":"https://api.github.com/repos/release-engineering/dockpulp/branches{/branch}","tags_url":"https://api.github.com/repos/release-engineering/dockpulp/tags","blobs_url":"https://api.github.com/repos/release-engineering/dockpulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/release-engineering/dockpulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/release-engineering/dockpulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/release-engineering/dockpulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/release-engineering/dockpulp/statuses/{sha}","languages_url":"https://api.github.com/repos/release-engineering/dockpulp/languages","stargazers_url":"https://api.github.com/repos/release-engineering/dockpulp/stargazers","contributors_url":"https://api.github.com/repos/release-engineering/dockpulp/contributors","subscribers_url":"https://api.github.com/repos/release-engineering/dockpulp/subscribers","subscription_url":"https://api.github.com/repos/release-engineering/dockpulp/subscription","commits_url":"https://api.github.com/repos/release-engineering/dockpulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/release-engineering/dockpulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/release-engineering/dockpulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/release-engineering/dockpulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/release-engineering/dockpulp/contents/{+path}","compare_url":"https://api.github.com/repos/release-engineering/dockpulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/release-engineering/dockpulp/merges","archive_url":"https://api.github.com/repos/release-engineering/dockpulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/release-engineering/dockpulp/downloads","issues_url":"https://api.github.com/repos/release-engineering/dockpulp/issues{/number}","pulls_url":"https://api.github.com/repos/release-engineering/dockpulp/pulls{/number}","milestones_url":"https://api.github.com/repos/release-engineering/dockpulp/milestones{/number}","notifications_url":"https://api.github.com/repos/release-engineering/dockpulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/release-engineering/dockpulp/labels{/name}","releases_url":"https://api.github.com/repos/release-engineering/dockpulp/releases{/id}","deployments_url":"https://api.github.com/repos/release-engineering/dockpulp/deployments","created_at":"2015-05-28T18:30:30Z","updated_at":"2017-09-07T16:18:57Z","pushed_at":"2018-03-07T21:35:09Z","git_url":"git://github.com/release-engineering/dockpulp.git","ssh_url":"git@github.com:release-engineering/dockpulp.git","clone_url":"https://github.com/release-engineering/dockpulp.git","svn_url":"https://github.com/release-engineering/dockpulp","homepage":null,"size":726,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":18,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171"},"html":{"href":"https://github.com/release-engineering/dockpulp/pull/171"},"issue":{"href":"https://api.github.com/repos/release-engineering/dockpulp/issues/171"},"comments":{"href":"https://api.github.com/repos/release-engineering/dockpulp/issues/171/comments"},"review_comments":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171/comments"},"review_comment":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/release-engineering/dockpulp/pulls/171/commits"},"statuses":{"href":"https://api.github.com/repos/release-engineering/dockpulp/statuses/ad2ef9574311ba5f9c0ef183a891548cb2cf6103"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"twaugh"}}