{"action":"created","comment":{"url":"https://api.github.com/repos/grimoirelab/perceval/pulls/comments/145057279","pull_request_review_id":69798745,"id":145057279,"diff_hunk":"@@ -875,6 +875,26 @@ def test_get_page_issues(self):\n         self.assertEqual(httpretty.last_request().headers[\"Authorization\"], \"token aaa\")\n \n     @httpretty.activate\n+    def test_abuse_rate_limit(self):\n+        \"\"\"Test when Abuse Rate Limit exception is thrown\"\"\"\n+\n+        abuse_rate_limit = read_file('data/github/abuse_rate_limit')\n+\n+        httpretty.register_uri(httpretty.GET,\n+                               GITHUB_ISSUES_URL,\n+                               body=abuse_rate_limit, status=403,\n+                               forcing_headers={\n+                                   'X-RateLimit-Remaining': '5',\n+                                   'X-RateLimit-Reset': '5',\n+                                   'Retry-After': '1'\n+                               })","path":"tests/test_github.py","position":16,"original_position":16,"commit_id":"6a2b68e46862e2f8ff912841335b167005e9f810","original_commit_id":"6a2b68e46862e2f8ff912841335b167005e9f810","user":{"login":"valeriocos","id":6515067,"avatar_url":"https://avatars2.githubusercontent.com/u/6515067?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriocos","html_url":"https://github.com/valeriocos","followers_url":"https://api.github.com/users/valeriocos/followers","following_url":"https://api.github.com/users/valeriocos/following{/other_user}","gists_url":"https://api.github.com/users/valeriocos/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriocos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriocos/subscriptions","organizations_url":"https://api.github.com/users/valeriocos/orgs","repos_url":"https://api.github.com/users/valeriocos/repos","events_url":"https://api.github.com/users/valeriocos/events{/privacy}","received_events_url":"https://api.github.com/users/valeriocos/received_events","type":"User","site_admin":false},"body":"The string is in the file tests/data/github/abuse_rate_limit which stores the JSON response for the Abuse rate limits error. The file is loaded at line 881","created_at":"2017-10-17T08:17:30Z","updated_at":"2017-10-17T08:17:30Z","html_url":"https://github.com/grimoirelab/perceval/pull/173#discussion_r145057279","pull_request_url":"https://api.github.com/repos/grimoirelab/perceval/pulls/173","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/comments/145057279"},"html":{"href":"https://github.com/grimoirelab/perceval/pull/173#discussion_r145057279"},"pull_request":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/173"}},"in_reply_to_id":144731760},"pull_request":{"url":"https://api.github.com/repos/grimoirelab/perceval/pulls/173","id":145425843,"html_url":"https://github.com/grimoirelab/perceval/pull/173","diff_url":"https://github.com/grimoirelab/perceval/pull/173.diff","patch_url":"https://github.com/grimoirelab/perceval/pull/173.patch","issue_url":"https://api.github.com/repos/grimoirelab/perceval/issues/173","number":173,"state":"open","locked":false,"title":"[github] Fix abuse rate limit error","user":{"login":"valeriocos","id":6515067,"avatar_url":"https://avatars2.githubusercontent.com/u/6515067?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriocos","html_url":"https://github.com/valeriocos","followers_url":"https://api.github.com/users/valeriocos/followers","following_url":"https://api.github.com/users/valeriocos/following{/other_user}","gists_url":"https://api.github.com/users/valeriocos/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriocos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriocos/subscriptions","organizations_url":"https://api.github.com/users/valeriocos/orgs","repos_url":"https://api.github.com/users/valeriocos/repos","events_url":"https://api.github.com/users/valeriocos/events{/privacy}","received_events_url":"https://api.github.com/users/valeriocos/received_events","type":"User","site_admin":false},"body":"This pull request extends the github backend to deal with [abuse rate limit exceptions](https://developer.github.com/v3/#staying-within-the-rate-limit).\r\nIn a nutshell, if an abuse rate limit exception is triggered when querying the API, the backend sleeps for the number of seconds reported in the **retry-after** header field. This process is repeated at most 5 times (**MAX_RETRIES** in GitHubClient), before the backend stops and returns an error.","created_at":"2017-10-09T11:09:02Z","updated_at":"2017-10-17T08:17:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f56e99be9aa78728fb28b14fe4c9931357911bb1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/grimoirelab/perceval/pulls/173/commits","review_comments_url":"https://api.github.com/repos/grimoirelab/perceval/pulls/173/comments","review_comment_url":"https://api.github.com/repos/grimoirelab/perceval/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grimoirelab/perceval/issues/173/comments","statuses_url":"https://api.github.com/repos/grimoirelab/perceval/statuses/6a2b68e46862e2f8ff912841335b167005e9f810","head":{"label":"valeriocos:github-fix-abuse-rate-limit","ref":"github-fix-abuse-rate-limit","sha":"6a2b68e46862e2f8ff912841335b167005e9f810","user":{"login":"valeriocos","id":6515067,"avatar_url":"https://avatars2.githubusercontent.com/u/6515067?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriocos","html_url":"https://github.com/valeriocos","followers_url":"https://api.github.com/users/valeriocos/followers","following_url":"https://api.github.com/users/valeriocos/following{/other_user}","gists_url":"https://api.github.com/users/valeriocos/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriocos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriocos/subscriptions","organizations_url":"https://api.github.com/users/valeriocos/orgs","repos_url":"https://api.github.com/users/valeriocos/repos","events_url":"https://api.github.com/users/valeriocos/events{/privacy}","received_events_url":"https://api.github.com/users/valeriocos/received_events","type":"User","site_admin":false},"repo":{"id":102737730,"name":"perceval","full_name":"valeriocos/perceval","owner":{"login":"valeriocos","id":6515067,"avatar_url":"https://avatars2.githubusercontent.com/u/6515067?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriocos","html_url":"https://github.com/valeriocos","followers_url":"https://api.github.com/users/valeriocos/followers","following_url":"https://api.github.com/users/valeriocos/following{/other_user}","gists_url":"https://api.github.com/users/valeriocos/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriocos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriocos/subscriptions","organizations_url":"https://api.github.com/users/valeriocos/orgs","repos_url":"https://api.github.com/users/valeriocos/repos","events_url":"https://api.github.com/users/valeriocos/events{/privacy}","received_events_url":"https://api.github.com/users/valeriocos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/valeriocos/perceval","description":"Send Sir Perceval on a quest to retrieve and gather data from software repositories.","fork":true,"url":"https://api.github.com/repos/valeriocos/perceval","forks_url":"https://api.github.com/repos/valeriocos/perceval/forks","keys_url":"https://api.github.com/repos/valeriocos/perceval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valeriocos/perceval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valeriocos/perceval/teams","hooks_url":"https://api.github.com/repos/valeriocos/perceval/hooks","issue_events_url":"https://api.github.com/repos/valeriocos/perceval/issues/events{/number}","events_url":"https://api.github.com/repos/valeriocos/perceval/events","assignees_url":"https://api.github.com/repos/valeriocos/perceval/assignees{/user}","branches_url":"https://api.github.com/repos/valeriocos/perceval/branches{/branch}","tags_url":"https://api.github.com/repos/valeriocos/perceval/tags","blobs_url":"https://api.github.com/repos/valeriocos/perceval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valeriocos/perceval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valeriocos/perceval/git/refs{/sha}","trees_url":"https://api.github.com/repos/valeriocos/perceval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valeriocos/perceval/statuses/{sha}","languages_url":"https://api.github.com/repos/valeriocos/perceval/languages","stargazers_url":"https://api.github.com/repos/valeriocos/perceval/stargazers","contributors_url":"https://api.github.com/repos/valeriocos/perceval/contributors","subscribers_url":"https://api.github.com/repos/valeriocos/perceval/subscribers","subscription_url":"https://api.github.com/repos/valeriocos/perceval/subscription","commits_url":"https://api.github.com/repos/valeriocos/perceval/commits{/sha}","git_commits_url":"https://api.github.com/repos/valeriocos/perceval/git/commits{/sha}","comments_url":"https://api.github.com/repos/valeriocos/perceval/comments{/number}","issue_comment_url":"https://api.github.com/repos/valeriocos/perceval/issues/comments{/number}","contents_url":"https://api.github.com/repos/valeriocos/perceval/contents/{+path}","compare_url":"https://api.github.com/repos/valeriocos/perceval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valeriocos/perceval/merges","archive_url":"https://api.github.com/repos/valeriocos/perceval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valeriocos/perceval/downloads","issues_url":"https://api.github.com/repos/valeriocos/perceval/issues{/number}","pulls_url":"https://api.github.com/repos/valeriocos/perceval/pulls{/number}","milestones_url":"https://api.github.com/repos/valeriocos/perceval/milestones{/number}","notifications_url":"https://api.github.com/repos/valeriocos/perceval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valeriocos/perceval/labels{/name}","releases_url":"https://api.github.com/repos/valeriocos/perceval/releases{/id}","deployments_url":"https://api.github.com/repos/valeriocos/perceval/deployments","created_at":"2017-09-07T13:04:03Z","updated_at":"2017-09-07T13:04:05Z","pushed_at":"2017-10-16T15:11:19Z","git_url":"git://github.com/valeriocos/perceval.git","ssh_url":"git@github.com:valeriocos/perceval.git","clone_url":"https://github.com/valeriocos/perceval.git","svn_url":"https://github.com/valeriocos/perceval","homepage":null,"size":1582,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grimoirelab:master","ref":"master","sha":"bb782a05c5deb097996619c8466ffec11efe4abd","user":{"login":"grimoirelab","id":16151805,"avatar_url":"https://avatars0.githubusercontent.com/u/16151805?v=4","gravatar_id":"","url":"https://api.github.com/users/grimoirelab","html_url":"https://github.com/grimoirelab","followers_url":"https://api.github.com/users/grimoirelab/followers","following_url":"https://api.github.com/users/grimoirelab/following{/other_user}","gists_url":"https://api.github.com/users/grimoirelab/gists{/gist_id}","starred_url":"https://api.github.com/users/grimoirelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grimoirelab/subscriptions","organizations_url":"https://api.github.com/users/grimoirelab/orgs","repos_url":"https://api.github.com/users/grimoirelab/repos","events_url":"https://api.github.com/users/grimoirelab/events{/privacy}","received_events_url":"https://api.github.com/users/grimoirelab/received_events","type":"Organization","site_admin":false},"repo":{"id":47415120,"name":"perceval","full_name":"grimoirelab/perceval","owner":{"login":"grimoirelab","id":16151805,"avatar_url":"https://avatars0.githubusercontent.com/u/16151805?v=4","gravatar_id":"","url":"https://api.github.com/users/grimoirelab","html_url":"https://github.com/grimoirelab","followers_url":"https://api.github.com/users/grimoirelab/followers","following_url":"https://api.github.com/users/grimoirelab/following{/other_user}","gists_url":"https://api.github.com/users/grimoirelab/gists{/gist_id}","starred_url":"https://api.github.com/users/grimoirelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grimoirelab/subscriptions","organizations_url":"https://api.github.com/users/grimoirelab/orgs","repos_url":"https://api.github.com/users/grimoirelab/repos","events_url":"https://api.github.com/users/grimoirelab/events{/privacy}","received_events_url":"https://api.github.com/users/grimoirelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grimoirelab/perceval","description":"Send Sir Perceval on a quest to retrieve and gather data from software repositories.","fork":false,"url":"https://api.github.com/repos/grimoirelab/perceval","forks_url":"https://api.github.com/repos/grimoirelab/perceval/forks","keys_url":"https://api.github.com/repos/grimoirelab/perceval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grimoirelab/perceval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grimoirelab/perceval/teams","hooks_url":"https://api.github.com/repos/grimoirelab/perceval/hooks","issue_events_url":"https://api.github.com/repos/grimoirelab/perceval/issues/events{/number}","events_url":"https://api.github.com/repos/grimoirelab/perceval/events","assignees_url":"https://api.github.com/repos/grimoirelab/perceval/assignees{/user}","branches_url":"https://api.github.com/repos/grimoirelab/perceval/branches{/branch}","tags_url":"https://api.github.com/repos/grimoirelab/perceval/tags","blobs_url":"https://api.github.com/repos/grimoirelab/perceval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grimoirelab/perceval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grimoirelab/perceval/git/refs{/sha}","trees_url":"https://api.github.com/repos/grimoirelab/perceval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grimoirelab/perceval/statuses/{sha}","languages_url":"https://api.github.com/repos/grimoirelab/perceval/languages","stargazers_url":"https://api.github.com/repos/grimoirelab/perceval/stargazers","contributors_url":"https://api.github.com/repos/grimoirelab/perceval/contributors","subscribers_url":"https://api.github.com/repos/grimoirelab/perceval/subscribers","subscription_url":"https://api.github.com/repos/grimoirelab/perceval/subscription","commits_url":"https://api.github.com/repos/grimoirelab/perceval/commits{/sha}","git_commits_url":"https://api.github.com/repos/grimoirelab/perceval/git/commits{/sha}","comments_url":"https://api.github.com/repos/grimoirelab/perceval/comments{/number}","issue_comment_url":"https://api.github.com/repos/grimoirelab/perceval/issues/comments{/number}","contents_url":"https://api.github.com/repos/grimoirelab/perceval/contents/{+path}","compare_url":"https://api.github.com/repos/grimoirelab/perceval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grimoirelab/perceval/merges","archive_url":"https://api.github.com/repos/grimoirelab/perceval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grimoirelab/perceval/downloads","issues_url":"https://api.github.com/repos/grimoirelab/perceval/issues{/number}","pulls_url":"https://api.github.com/repos/grimoirelab/perceval/pulls{/number}","milestones_url":"https://api.github.com/repos/grimoirelab/perceval/milestones{/number}","notifications_url":"https://api.github.com/repos/grimoirelab/perceval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grimoirelab/perceval/labels{/name}","releases_url":"https://api.github.com/repos/grimoirelab/perceval/releases{/id}","deployments_url":"https://api.github.com/repos/grimoirelab/perceval/deployments","created_at":"2015-12-04T16:20:11Z","updated_at":"2017-10-11T16:20:22Z","pushed_at":"2017-10-16T15:16:07Z","git_url":"git://github.com/grimoirelab/perceval.git","ssh_url":"git@github.com:grimoirelab/perceval.git","clone_url":"https://github.com/grimoirelab/perceval.git","svn_url":"https://github.com/grimoirelab/perceval","homepage":null,"size":1541,"stargazers_count":62,"watchers_count":62,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":35,"forks":30,"open_issues":35,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/173"},"html":{"href":"https://github.com/grimoirelab/perceval/pull/173"},"issue":{"href":"https://api.github.com/repos/grimoirelab/perceval/issues/173"},"comments":{"href":"https://api.github.com/repos/grimoirelab/perceval/issues/173/comments"},"review_comments":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/173/comments"},"review_comment":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grimoirelab/perceval/pulls/173/commits"},"statuses":{"href":"https://api.github.com/repos/grimoirelab/perceval/statuses/6a2b68e46862e2f8ff912841335b167005e9f810"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"valeriocos"}}