{"action":"opened","number":148,"pull_request":{"url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148","id":45505527,"html_url":"https://github.com/fedora-infra/python-fedora/pull/148","diff_url":"https://github.com/fedora-infra/python-fedora/pull/148.diff","patch_url":"https://github.com/fedora-infra/python-fedora/pull/148.patch","issue_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/148","number":148,"state":"open","locked":false,"title":"improve Bodhi2Client.query compat for old client","user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"body":"This basically fixes 'bodhi -D' with the 'old' CLI client (the\r\none we still ship). bodhi -D is typically used like this:\r\n\r\nbodhi -D fedfind-1.6-1.el6\r\nbodhi -D FEDORA-EPEL-2015-8157\r\n\r\nneither of these worked. The client submits the term as\r\n'package'; Bodhi2Client was simply converting it to 'packages'.\r\nBut 'packages' expects bare package name(s), not NEVRs or\r\nupdate IDs. The old API would try the 'update' argument as an\r\nupdate ID, then if that didn't work try it as a package name,\r\nthen if *that* didn't work try it as a NEVR - see:\r\nhttps://github.com/fedora-infra/bodhi/blob/bodhi1-develop/bodhi/controllers.py#L358\r\nSo we try and replicate that here, only by using regexes\r\ninstead of by running three queries.\r\n\r\nThere are two other necessary fixes also. The 'type_' arg has\r\nto be converted to 'type' here too, and we have to convert the\r\n'bugs' argument to None if it's an empty string, because of how\r\nthe API query_updates() method works (it does 'if bugs is not\r\nNone' rather than 'if not bugs').","created_at":"2015-09-20T22:23:24Z","updated_at":"2015-09-20T22:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148/commits","review_comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148/comments","review_comment_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/148/comments","statuses_url":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/4c08d34f5d7af2ea2de2c6dc5f957ac48c68dc47","head":{"label":"AdamWill:cli-download","ref":"cli-download","sha":"4c08d34f5d7af2ea2de2c6dc5f957ac48c68dc47","user":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"repo":{"id":42820470,"name":"python-fedora","full_name":"AdamWill/python-fedora","owner":{"login":"AdamWill","id":916551,"avatar_url":"https://avatars.githubusercontent.com/u/916551?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamWill","html_url":"https://github.com/AdamWill","followers_url":"https://api.github.com/users/AdamWill/followers","following_url":"https://api.github.com/users/AdamWill/following{/other_user}","gists_url":"https://api.github.com/users/AdamWill/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamWill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamWill/subscriptions","organizations_url":"https://api.github.com/users/AdamWill/orgs","repos_url":"https://api.github.com/users/AdamWill/repos","events_url":"https://api.github.com/users/AdamWill/events{/privacy}","received_events_url":"https://api.github.com/users/AdamWill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdamWill/python-fedora","description":"A Python library for interacting with, and connecting to, Fedora services.","fork":true,"url":"https://api.github.com/repos/AdamWill/python-fedora","forks_url":"https://api.github.com/repos/AdamWill/python-fedora/forks","keys_url":"https://api.github.com/repos/AdamWill/python-fedora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdamWill/python-fedora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdamWill/python-fedora/teams","hooks_url":"https://api.github.com/repos/AdamWill/python-fedora/hooks","issue_events_url":"https://api.github.com/repos/AdamWill/python-fedora/issues/events{/number}","events_url":"https://api.github.com/repos/AdamWill/python-fedora/events","assignees_url":"https://api.github.com/repos/AdamWill/python-fedora/assignees{/user}","branches_url":"https://api.github.com/repos/AdamWill/python-fedora/branches{/branch}","tags_url":"https://api.github.com/repos/AdamWill/python-fedora/tags","blobs_url":"https://api.github.com/repos/AdamWill/python-fedora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdamWill/python-fedora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdamWill/python-fedora/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdamWill/python-fedora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdamWill/python-fedora/statuses/{sha}","languages_url":"https://api.github.com/repos/AdamWill/python-fedora/languages","stargazers_url":"https://api.github.com/repos/AdamWill/python-fedora/stargazers","contributors_url":"https://api.github.com/repos/AdamWill/python-fedora/contributors","subscribers_url":"https://api.github.com/repos/AdamWill/python-fedora/subscribers","subscription_url":"https://api.github.com/repos/AdamWill/python-fedora/subscription","commits_url":"https://api.github.com/repos/AdamWill/python-fedora/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdamWill/python-fedora/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdamWill/python-fedora/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdamWill/python-fedora/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdamWill/python-fedora/contents/{+path}","compare_url":"https://api.github.com/repos/AdamWill/python-fedora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdamWill/python-fedora/merges","archive_url":"https://api.github.com/repos/AdamWill/python-fedora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdamWill/python-fedora/downloads","issues_url":"https://api.github.com/repos/AdamWill/python-fedora/issues{/number}","pulls_url":"https://api.github.com/repos/AdamWill/python-fedora/pulls{/number}","milestones_url":"https://api.github.com/repos/AdamWill/python-fedora/milestones{/number}","notifications_url":"https://api.github.com/repos/AdamWill/python-fedora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdamWill/python-fedora/labels{/name}","releases_url":"https://api.github.com/repos/AdamWill/python-fedora/releases{/id}","created_at":"2015-09-20T16:37:08Z","updated_at":"2015-09-20T16:37:09Z","pushed_at":"2015-09-20T22:21:52Z","git_url":"git://github.com/AdamWill/python-fedora.git","ssh_url":"git@github.com:AdamWill/python-fedora.git","clone_url":"https://github.com/AdamWill/python-fedora.git","svn_url":"https://github.com/AdamWill/python-fedora","homepage":"","size":5305,"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":"239cad0809bd8d80013a023d310bbd550cec87f7","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":7708613,"name":"python-fedora","full_name":"fedora-infra/python-fedora","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/python-fedora","description":"A Python library for interacting with, and connecting to, Fedora services.","fork":false,"url":"https://api.github.com/repos/fedora-infra/python-fedora","forks_url":"https://api.github.com/repos/fedora-infra/python-fedora/forks","keys_url":"https://api.github.com/repos/fedora-infra/python-fedora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/python-fedora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/python-fedora/teams","hooks_url":"https://api.github.com/repos/fedora-infra/python-fedora/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/python-fedora/events","assignees_url":"https://api.github.com/repos/fedora-infra/python-fedora/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/python-fedora/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/tags","blobs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/python-fedora/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/python-fedora/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/python-fedora/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscription","commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/python-fedora/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/python-fedora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/python-fedora/merges","archive_url":"https://api.github.com/repos/fedora-infra/python-fedora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/python-fedora/downloads","issues_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/python-fedora/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/python-fedora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/python-fedora/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/python-fedora/releases{/id}","created_at":"2013-01-19T20:48:42Z","updated_at":"2015-09-09T07:47:05Z","pushed_at":"2015-09-11T18:51:24Z","git_url":"git://github.com/fedora-infra/python-fedora.git","ssh_url":"git@github.com:fedora-infra/python-fedora.git","clone_url":"https://github.com/fedora-infra/python-fedora.git","svn_url":"https://github.com/fedora-infra/python-fedora","homepage":"","size":5305,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":4,"forks":14,"open_issues":4,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148"},"html":{"href":"https://github.com/fedora-infra/python-fedora/pull/148"},"issue":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/issues/148"},"comments":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/4c08d34f5d7af2ea2de2c6dc5f957ac48c68dc47"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":16,"deletions":1,"changed_files":1}}