{"action":"created","comment":{"url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/comments/83234312","pull_request_review_id":4090484,"id":83234312,"diff_hunk":"@@ -16,13 +16,17 @@ module.exports = function retryAsPromised(callback, options) {\n     timeout: options.timeout || undefined,\n     match: options.match || [],\n     backoffBase: options.backoffBase === undefined ? 100 : options.backoffBase,\n-    backoffExponent: options.backoffExponent || 1.1\n+    backoffExponent: options.backoffExponent || 1.1,\n+    report: options.report || false,\n+    reportFn: options.reportFn || console.log,\n+    name:  callback.name || options.name || 'unknown'\n   };\n   \n   // Massage match option into array so we can blindly treat it as such later\n   if (!Array.isArray(options.match)) options.match = [options.match];\n \n-  debug('Trying '+callback.name+' (%s)', options.$current);\n+  debug('Trying '+ options.name+' (%s)', options.$current);\n+  if(options.report) options.reportFn('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString());","path":"index.js","position":16,"original_position":16,"commit_id":"279d3ab74727a1a64133cbdb20149ca255f4fd93","original_commit_id":"279d3ab74727a1a64133cbdb20149ca255f4fd93","user":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"body":"To maintain bc lets scrap `reportFn` and just use `options.report` if defined.\r\nAnd i think `options.report` should take two arguments, a log string and then meta data `{name, current, timestamp}`","created_at":"2016-10-13T14:51:21Z","updated_at":"2016-10-13T14:51:21Z","html_url":"https://github.com/mickhansen/retry-as-promised/pull/5#discussion_r83234312","pull_request_url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/comments/83234312"},"html":{"href":"https://github.com/mickhansen/retry-as-promised/pull/5#discussion_r83234312"},"pull_request":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5","id":89217377,"html_url":"https://github.com/mickhansen/retry-as-promised/pull/5","diff_url":"https://github.com/mickhansen/retry-as-promised/pull/5.diff","patch_url":"https://github.com/mickhansen/retry-as-promised/pull/5.patch","issue_url":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/5","number":5,"state":"open","locked":false,"title":"Reporting Control Changes","user":{"login":"paulxtiseo","id":2977050,"avatar_url":"https://avatars.githubusercontent.com/u/2977050?v=3","gravatar_id":"","url":"https://api.github.com/users/paulxtiseo","html_url":"https://github.com/paulxtiseo","followers_url":"https://api.github.com/users/paulxtiseo/followers","following_url":"https://api.github.com/users/paulxtiseo/following{/other_user}","gists_url":"https://api.github.com/users/paulxtiseo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulxtiseo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulxtiseo/subscriptions","organizations_url":"https://api.github.com/users/paulxtiseo/orgs","repos_url":"https://api.github.com/users/paulxtiseo/repos","events_url":"https://api.github.com/users/paulxtiseo/events{/privacy}","received_events_url":"https://api.github.com/users/paulxtiseo/received_events","type":"User","site_admin":false},"body":"Added a bit more control over reporting module behavior for a project I am using retry-as-promised on, also added cross-env package (for testing on Windows and environment var setting) and updated Bluebird.","created_at":"2016-10-13T14:47:39Z","updated_at":"2016-10-13T14:51:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88132246e4f5d231908b760e4187d172d1d276f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5/commits","review_comments_url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5/comments","review_comment_url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/5/comments","statuses_url":"https://api.github.com/repos/mickhansen/retry-as-promised/statuses/279d3ab74727a1a64133cbdb20149ca255f4fd93","head":{"label":"paulxtiseo:reporting-changes","ref":"reporting-changes","sha":"279d3ab74727a1a64133cbdb20149ca255f4fd93","user":{"login":"paulxtiseo","id":2977050,"avatar_url":"https://avatars.githubusercontent.com/u/2977050?v=3","gravatar_id":"","url":"https://api.github.com/users/paulxtiseo","html_url":"https://github.com/paulxtiseo","followers_url":"https://api.github.com/users/paulxtiseo/followers","following_url":"https://api.github.com/users/paulxtiseo/following{/other_user}","gists_url":"https://api.github.com/users/paulxtiseo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulxtiseo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulxtiseo/subscriptions","organizations_url":"https://api.github.com/users/paulxtiseo/orgs","repos_url":"https://api.github.com/users/paulxtiseo/repos","events_url":"https://api.github.com/users/paulxtiseo/events{/privacy}","received_events_url":"https://api.github.com/users/paulxtiseo/received_events","type":"User","site_admin":false},"repo":{"id":70710314,"name":"retry-as-promised","full_name":"paulxtiseo/retry-as-promised","owner":{"login":"paulxtiseo","id":2977050,"avatar_url":"https://avatars.githubusercontent.com/u/2977050?v=3","gravatar_id":"","url":"https://api.github.com/users/paulxtiseo","html_url":"https://github.com/paulxtiseo","followers_url":"https://api.github.com/users/paulxtiseo/followers","following_url":"https://api.github.com/users/paulxtiseo/following{/other_user}","gists_url":"https://api.github.com/users/paulxtiseo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulxtiseo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulxtiseo/subscriptions","organizations_url":"https://api.github.com/users/paulxtiseo/orgs","repos_url":"https://api.github.com/users/paulxtiseo/repos","events_url":"https://api.github.com/users/paulxtiseo/events{/privacy}","received_events_url":"https://api.github.com/users/paulxtiseo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulxtiseo/retry-as-promised","description":"Retry a failed promise","fork":true,"url":"https://api.github.com/repos/paulxtiseo/retry-as-promised","forks_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/forks","keys_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/teams","hooks_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/hooks","issue_events_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/issues/events{/number}","events_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/events","assignees_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/assignees{/user}","branches_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/branches{/branch}","tags_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/tags","blobs_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/statuses/{sha}","languages_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/languages","stargazers_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/stargazers","contributors_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/contributors","subscribers_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/subscribers","subscription_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/subscription","commits_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/contents/{+path}","compare_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/merges","archive_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/downloads","issues_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/issues{/number}","pulls_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/pulls{/number}","milestones_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/milestones{/number}","notifications_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/labels{/name}","releases_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/releases{/id}","deployments_url":"https://api.github.com/repos/paulxtiseo/retry-as-promised/deployments","created_at":"2016-10-12T14:51:39Z","updated_at":"2016-10-12T14:51:41Z","pushed_at":"2016-10-13T14:45:15Z","git_url":"git://github.com/paulxtiseo/retry-as-promised.git","ssh_url":"git@github.com:paulxtiseo/retry-as-promised.git","clone_url":"https://github.com/paulxtiseo/retry-as-promised.git","svn_url":"https://github.com/paulxtiseo/retry-as-promised","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"mickhansen:master","ref":"master","sha":"6ac85db9a7b2abef8677176ae2914d68b56ed1be","user":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"repo":{"id":36751458,"name":"retry-as-promised","full_name":"mickhansen/retry-as-promised","owner":{"login":"mickhansen","id":699049,"avatar_url":"https://avatars.githubusercontent.com/u/699049?v=3","gravatar_id":"","url":"https://api.github.com/users/mickhansen","html_url":"https://github.com/mickhansen","followers_url":"https://api.github.com/users/mickhansen/followers","following_url":"https://api.github.com/users/mickhansen/following{/other_user}","gists_url":"https://api.github.com/users/mickhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/mickhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickhansen/subscriptions","organizations_url":"https://api.github.com/users/mickhansen/orgs","repos_url":"https://api.github.com/users/mickhansen/repos","events_url":"https://api.github.com/users/mickhansen/events{/privacy}","received_events_url":"https://api.github.com/users/mickhansen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mickhansen/retry-as-promised","description":"Retry a failed promise","fork":false,"url":"https://api.github.com/repos/mickhansen/retry-as-promised","forks_url":"https://api.github.com/repos/mickhansen/retry-as-promised/forks","keys_url":"https://api.github.com/repos/mickhansen/retry-as-promised/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mickhansen/retry-as-promised/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mickhansen/retry-as-promised/teams","hooks_url":"https://api.github.com/repos/mickhansen/retry-as-promised/hooks","issue_events_url":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/events{/number}","events_url":"https://api.github.com/repos/mickhansen/retry-as-promised/events","assignees_url":"https://api.github.com/repos/mickhansen/retry-as-promised/assignees{/user}","branches_url":"https://api.github.com/repos/mickhansen/retry-as-promised/branches{/branch}","tags_url":"https://api.github.com/repos/mickhansen/retry-as-promised/tags","blobs_url":"https://api.github.com/repos/mickhansen/retry-as-promised/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mickhansen/retry-as-promised/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mickhansen/retry-as-promised/git/refs{/sha}","trees_url":"https://api.github.com/repos/mickhansen/retry-as-promised/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mickhansen/retry-as-promised/statuses/{sha}","languages_url":"https://api.github.com/repos/mickhansen/retry-as-promised/languages","stargazers_url":"https://api.github.com/repos/mickhansen/retry-as-promised/stargazers","contributors_url":"https://api.github.com/repos/mickhansen/retry-as-promised/contributors","subscribers_url":"https://api.github.com/repos/mickhansen/retry-as-promised/subscribers","subscription_url":"https://api.github.com/repos/mickhansen/retry-as-promised/subscription","commits_url":"https://api.github.com/repos/mickhansen/retry-as-promised/commits{/sha}","git_commits_url":"https://api.github.com/repos/mickhansen/retry-as-promised/git/commits{/sha}","comments_url":"https://api.github.com/repos/mickhansen/retry-as-promised/comments{/number}","issue_comment_url":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/comments{/number}","contents_url":"https://api.github.com/repos/mickhansen/retry-as-promised/contents/{+path}","compare_url":"https://api.github.com/repos/mickhansen/retry-as-promised/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mickhansen/retry-as-promised/merges","archive_url":"https://api.github.com/repos/mickhansen/retry-as-promised/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mickhansen/retry-as-promised/downloads","issues_url":"https://api.github.com/repos/mickhansen/retry-as-promised/issues{/number}","pulls_url":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls{/number}","milestones_url":"https://api.github.com/repos/mickhansen/retry-as-promised/milestones{/number}","notifications_url":"https://api.github.com/repos/mickhansen/retry-as-promised/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mickhansen/retry-as-promised/labels{/name}","releases_url":"https://api.github.com/repos/mickhansen/retry-as-promised/releases{/id}","deployments_url":"https://api.github.com/repos/mickhansen/retry-as-promised/deployments","created_at":"2015-06-02T17:58:40Z","updated_at":"2016-09-18T02:51:13Z","pushed_at":"2016-10-13T14:47:39Z","git_url":"git://github.com/mickhansen/retry-as-promised.git","ssh_url":"git@github.com:mickhansen/retry-as-promised.git","clone_url":"https://github.com/mickhansen/retry-as-promised.git","svn_url":"https://github.com/mickhansen/retry-as-promised","homepage":null,"size":15,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5"},"html":{"href":"https://github.com/mickhansen/retry-as-promised/pull/5"},"issue":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/5"},"comments":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/mickhansen/retry-as-promised/statuses/279d3ab74727a1a64133cbdb20149ca255f4fd93"}}}}
{"actor":{"display_login":"mickhansen"}}