{"action":"created","comment":{"url":"https://api.github.com/repos/release-monitoring/anitya/pulls/comments/212891265","pull_request_review_id":149610835,"id":212891265,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjg5MTI2NQ==","diff_hunk":"@@ -98,7 +105,13 @@ def expand_subdirs(self, url, glob_char=\"*\"):\n         text_regex = re.compile(r'^d.+\\s(\\S+)\\s*$', re.I | re.M)\n \n         if url_prefix != \"\":\n-            dir_listing = self.call_url(url_prefix).text\n+            resp = self.call_url(url_prefix)\n+            # When FTP server is called, Response object is not created\n+            # and we get binary string instead\n+            try:\n+                dir_listing = resp.text\n+            except AttributeError:\n+                dir_listing = resp.decode('utf-8')","path":"anitya/lib/backends/__init__.py","position":25,"original_position":25,"commit_id":"d8cb24b4097ed4c468b37c9eb990de2bc15d7e54","original_commit_id":"d8cb24b4097ed4c468b37c9eb990de2bc15d7e54","user":{"login":"Zlopez","id":6943409,"node_id":"MDQ6VXNlcjY5NDM0MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/6943409?v=4","gravatar_id":"","url":"https://api.github.com/users/Zlopez","html_url":"https://github.com/Zlopez","followers_url":"https://api.github.com/users/Zlopez/followers","following_url":"https://api.github.com/users/Zlopez/following{/other_user}","gists_url":"https://api.github.com/users/Zlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Zlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zlopez/subscriptions","organizations_url":"https://api.github.com/users/Zlopez/orgs","repos_url":"https://api.github.com/users/Zlopez/repos","events_url":"https://api.github.com/users/Zlopez/events{/privacy}","received_events_url":"https://api.github.com/users/Zlopez/received_events","type":"User","site_admin":false},"body":"I will add another try-except when trying to decode the binary string and if it's not UTF-8, I will just raise `AnityaPluginException`.\r\nMaybe there is some way, how to get the encodings of the binary string and then use the appropriate decode method. This will be nice way how to do it.\r\nI will check this.\r\nIt will be much easier, if `Requests` library could work with FTP.","created_at":"2018-08-27T07:44:02Z","updated_at":"2018-08-27T07:44:02Z","html_url":"https://github.com/release-monitoring/anitya/pull/582#discussion_r212891265","pull_request_url":"https://api.github.com/repos/release-monitoring/anitya/pulls/582","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/comments/212891265"},"html":{"href":"https://github.com/release-monitoring/anitya/pull/582#discussion_r212891265"},"pull_request":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/582"}},"in_reply_to_id":212702533},"pull_request":{"url":"https://api.github.com/repos/release-monitoring/anitya/pulls/582","id":209836683,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5ODM2Njgz","html_url":"https://github.com/release-monitoring/anitya/pull/582","diff_url":"https://github.com/release-monitoring/anitya/pull/582.diff","patch_url":"https://github.com/release-monitoring/anitya/pull/582.patch","issue_url":"https://api.github.com/repos/release-monitoring/anitya/issues/582","number":582,"state":"open","locked":false,"title":"Update Github backend to use Github API v4","user":{"login":"Zlopez","id":6943409,"node_id":"MDQ6VXNlcjY5NDM0MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/6943409?v=4","gravatar_id":"","url":"https://api.github.com/users/Zlopez","html_url":"https://github.com/Zlopez","followers_url":"https://api.github.com/users/Zlopez/followers","following_url":"https://api.github.com/users/Zlopez/following{/other_user}","gists_url":"https://api.github.com/users/Zlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Zlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zlopez/subscriptions","organizations_url":"https://api.github.com/users/Zlopez/orgs","repos_url":"https://api.github.com/users/Zlopez/repos","events_url":"https://api.github.com/users/Zlopez/events{/privacy}","received_events_url":"https://api.github.com/users/Zlopez/received_events","type":"User","site_admin":false},"body":"Implementation of [Github API v4](https://developer.github.com/v4/) as requested in https://github.com/release-monitoring/anitya/issues/567\r\nThis should also solve https://github.com/release-monitoring/anitya/issues/581","created_at":"2018-08-21T14:01:10Z","updated_at":"2018-08-27T07:44:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7abec4e9c5ad12b30afd49eba51f6f68560a33e6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/release-monitoring/anitya/pulls/582/commits","review_comments_url":"https://api.github.com/repos/release-monitoring/anitya/pulls/582/comments","review_comment_url":"https://api.github.com/repos/release-monitoring/anitya/pulls/comments{/number}","comments_url":"https://api.github.com/repos/release-monitoring/anitya/issues/582/comments","statuses_url":"https://api.github.com/repos/release-monitoring/anitya/statuses/d8cb24b4097ed4c468b37c9eb990de2bc15d7e54","head":{"label":"Zlopez:github_API","ref":"github_API","sha":"d8cb24b4097ed4c468b37c9eb990de2bc15d7e54","user":{"login":"Zlopez","id":6943409,"node_id":"MDQ6VXNlcjY5NDM0MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/6943409?v=4","gravatar_id":"","url":"https://api.github.com/users/Zlopez","html_url":"https://github.com/Zlopez","followers_url":"https://api.github.com/users/Zlopez/followers","following_url":"https://api.github.com/users/Zlopez/following{/other_user}","gists_url":"https://api.github.com/users/Zlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Zlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zlopez/subscriptions","organizations_url":"https://api.github.com/users/Zlopez/orgs","repos_url":"https://api.github.com/users/Zlopez/repos","events_url":"https://api.github.com/users/Zlopez/events{/privacy}","received_events_url":"https://api.github.com/users/Zlopez/received_events","type":"User","site_admin":false},"repo":{"id":143435986,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0MzU5ODY=","name":"anitya","full_name":"Zlopez/anitya","owner":{"login":"Zlopez","id":6943409,"node_id":"MDQ6VXNlcjY5NDM0MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/6943409?v=4","gravatar_id":"","url":"https://api.github.com/users/Zlopez","html_url":"https://github.com/Zlopez","followers_url":"https://api.github.com/users/Zlopez/followers","following_url":"https://api.github.com/users/Zlopez/following{/other_user}","gists_url":"https://api.github.com/users/Zlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Zlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zlopez/subscriptions","organizations_url":"https://api.github.com/users/Zlopez/orgs","repos_url":"https://api.github.com/users/Zlopez/repos","events_url":"https://api.github.com/users/Zlopez/events{/privacy}","received_events_url":"https://api.github.com/users/Zlopez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zlopez/anitya","description":"A cross-distribution upstream release monitoring project","fork":true,"url":"https://api.github.com/repos/Zlopez/anitya","forks_url":"https://api.github.com/repos/Zlopez/anitya/forks","keys_url":"https://api.github.com/repos/Zlopez/anitya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zlopez/anitya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zlopez/anitya/teams","hooks_url":"https://api.github.com/repos/Zlopez/anitya/hooks","issue_events_url":"https://api.github.com/repos/Zlopez/anitya/issues/events{/number}","events_url":"https://api.github.com/repos/Zlopez/anitya/events","assignees_url":"https://api.github.com/repos/Zlopez/anitya/assignees{/user}","branches_url":"https://api.github.com/repos/Zlopez/anitya/branches{/branch}","tags_url":"https://api.github.com/repos/Zlopez/anitya/tags","blobs_url":"https://api.github.com/repos/Zlopez/anitya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zlopez/anitya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zlopez/anitya/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zlopez/anitya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zlopez/anitya/statuses/{sha}","languages_url":"https://api.github.com/repos/Zlopez/anitya/languages","stargazers_url":"https://api.github.com/repos/Zlopez/anitya/stargazers","contributors_url":"https://api.github.com/repos/Zlopez/anitya/contributors","subscribers_url":"https://api.github.com/repos/Zlopez/anitya/subscribers","subscription_url":"https://api.github.com/repos/Zlopez/anitya/subscription","commits_url":"https://api.github.com/repos/Zlopez/anitya/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zlopez/anitya/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zlopez/anitya/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zlopez/anitya/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zlopez/anitya/contents/{+path}","compare_url":"https://api.github.com/repos/Zlopez/anitya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zlopez/anitya/merges","archive_url":"https://api.github.com/repos/Zlopez/anitya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zlopez/anitya/downloads","issues_url":"https://api.github.com/repos/Zlopez/anitya/issues{/number}","pulls_url":"https://api.github.com/repos/Zlopez/anitya/pulls{/number}","milestones_url":"https://api.github.com/repos/Zlopez/anitya/milestones{/number}","notifications_url":"https://api.github.com/repos/Zlopez/anitya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zlopez/anitya/labels{/name}","releases_url":"https://api.github.com/repos/Zlopez/anitya/releases{/id}","deployments_url":"https://api.github.com/repos/Zlopez/anitya/deployments","created_at":"2018-08-03T14:16:17Z","updated_at":"2018-08-24T11:53:42Z","pushed_at":"2018-08-24T11:54:38Z","git_url":"git://github.com/Zlopez/anitya.git","ssh_url":"git@github.com:Zlopez/anitya.git","clone_url":"https://github.com/Zlopez/anitya.git","svn_url":"https://github.com/Zlopez/anitya","homepage":"https://release-monitoring.org","size":5804,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"release-monitoring:master","ref":"master","sha":"a81c0c347154046f58ecb3478eb30260f64c8eeb","user":{"login":"release-monitoring","id":25616149,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjE2MTQ5","avatar_url":"https://avatars1.githubusercontent.com/u/25616149?v=4","gravatar_id":"","url":"https://api.github.com/users/release-monitoring","html_url":"https://github.com/release-monitoring","followers_url":"https://api.github.com/users/release-monitoring/followers","following_url":"https://api.github.com/users/release-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/release-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/release-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-monitoring/subscriptions","organizations_url":"https://api.github.com/users/release-monitoring/orgs","repos_url":"https://api.github.com/users/release-monitoring/repos","events_url":"https://api.github.com/users/release-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/release-monitoring/received_events","type":"Organization","site_admin":false},"repo":{"id":14798348,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc5ODM0OA==","name":"anitya","full_name":"release-monitoring/anitya","owner":{"login":"release-monitoring","id":25616149,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NjE2MTQ5","avatar_url":"https://avatars1.githubusercontent.com/u/25616149?v=4","gravatar_id":"","url":"https://api.github.com/users/release-monitoring","html_url":"https://github.com/release-monitoring","followers_url":"https://api.github.com/users/release-monitoring/followers","following_url":"https://api.github.com/users/release-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/release-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/release-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-monitoring/subscriptions","organizations_url":"https://api.github.com/users/release-monitoring/orgs","repos_url":"https://api.github.com/users/release-monitoring/repos","events_url":"https://api.github.com/users/release-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/release-monitoring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/release-monitoring/anitya","description":"A cross-distribution upstream release monitoring project","fork":false,"url":"https://api.github.com/repos/release-monitoring/anitya","forks_url":"https://api.github.com/repos/release-monitoring/anitya/forks","keys_url":"https://api.github.com/repos/release-monitoring/anitya/keys{/key_id}","collaborators_url":"https://api.github.com/repos/release-monitoring/anitya/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/release-monitoring/anitya/teams","hooks_url":"https://api.github.com/repos/release-monitoring/anitya/hooks","issue_events_url":"https://api.github.com/repos/release-monitoring/anitya/issues/events{/number}","events_url":"https://api.github.com/repos/release-monitoring/anitya/events","assignees_url":"https://api.github.com/repos/release-monitoring/anitya/assignees{/user}","branches_url":"https://api.github.com/repos/release-monitoring/anitya/branches{/branch}","tags_url":"https://api.github.com/repos/release-monitoring/anitya/tags","blobs_url":"https://api.github.com/repos/release-monitoring/anitya/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/release-monitoring/anitya/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/release-monitoring/anitya/git/refs{/sha}","trees_url":"https://api.github.com/repos/release-monitoring/anitya/git/trees{/sha}","statuses_url":"https://api.github.com/repos/release-monitoring/anitya/statuses/{sha}","languages_url":"https://api.github.com/repos/release-monitoring/anitya/languages","stargazers_url":"https://api.github.com/repos/release-monitoring/anitya/stargazers","contributors_url":"https://api.github.com/repos/release-monitoring/anitya/contributors","subscribers_url":"https://api.github.com/repos/release-monitoring/anitya/subscribers","subscription_url":"https://api.github.com/repos/release-monitoring/anitya/subscription","commits_url":"https://api.github.com/repos/release-monitoring/anitya/commits{/sha}","git_commits_url":"https://api.github.com/repos/release-monitoring/anitya/git/commits{/sha}","comments_url":"https://api.github.com/repos/release-monitoring/anitya/comments{/number}","issue_comment_url":"https://api.github.com/repos/release-monitoring/anitya/issues/comments{/number}","contents_url":"https://api.github.com/repos/release-monitoring/anitya/contents/{+path}","compare_url":"https://api.github.com/repos/release-monitoring/anitya/compare/{base}...{head}","merges_url":"https://api.github.com/repos/release-monitoring/anitya/merges","archive_url":"https://api.github.com/repos/release-monitoring/anitya/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/release-monitoring/anitya/downloads","issues_url":"https://api.github.com/repos/release-monitoring/anitya/issues{/number}","pulls_url":"https://api.github.com/repos/release-monitoring/anitya/pulls{/number}","milestones_url":"https://api.github.com/repos/release-monitoring/anitya/milestones{/number}","notifications_url":"https://api.github.com/repos/release-monitoring/anitya/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/release-monitoring/anitya/labels{/name}","releases_url":"https://api.github.com/repos/release-monitoring/anitya/releases{/id}","deployments_url":"https://api.github.com/repos/release-monitoring/anitya/deployments","created_at":"2013-11-29T10:17:26Z","updated_at":"2018-08-24T09:04:31Z","pushed_at":"2018-08-24T11:54:38Z","git_url":"git://github.com/release-monitoring/anitya.git","ssh_url":"git@github.com:release-monitoring/anitya.git","clone_url":"https://github.com/release-monitoring/anitya.git","svn_url":"https://github.com/release-monitoring/anitya","homepage":"https://release-monitoring.org","size":5777,"stargazers_count":107,"watchers_count":107,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":82,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":54,"open_issues":82,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/582"},"html":{"href":"https://github.com/release-monitoring/anitya/pull/582"},"issue":{"href":"https://api.github.com/repos/release-monitoring/anitya/issues/582"},"comments":{"href":"https://api.github.com/repos/release-monitoring/anitya/issues/582/comments"},"review_comments":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/582/comments"},"review_comment":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/release-monitoring/anitya/pulls/582/commits"},"statuses":{"href":"https://api.github.com/repos/release-monitoring/anitya/statuses/d8cb24b4097ed4c468b37c9eb990de2bc15d7e54"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Zlopez"}}