{"action":"created","comment":{"url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/comments/171282656","pull_request_review_id":100107670,"id":171282656,"diff_hunk":"@@ -718,25 +743,79 @@ module.exports = {\n     var when = this.getDate(new Date());\n     var permlink = 'treeplanter-report-' + when;\n \n-    var tags = {tags: ['nature','charity','treeplanter','life','fundraising']};\n+    var tags = {tags: ['charity','fundraising','nature','life','treeplanter']};\n \n     // Calculate new total with current market changes\n     var total_trees = ((total * ci.sbd_to_dollar) / 2).toFixed(2);\n \n     // Calculate daily average\n     // Create function to calculate this.\n-    var average = 29.3;\n-\n+    var average = wait.for(this.getTreesAverage);\n+    average = average[0].average.toFixed(2);\n     // Magic to generate body\n     var header = 'Rank | Username | Total \\n---|---|---\\n';\n-    var body = 'Hello all tree planters.\\n';\n-    body += 'We can plant ' + total_trees + ' of trees thanks to you.\\n\\n';\n-    body += 'Followers: ' + count + '\\nNumber of tree planters: ' + donators;\n-    body += '\\nTrees planted: ' + total_trees + '\\n';\n-    body += 'Average amount of trees planted daily: ' + average + '\\n';\n-    body += 'STEEM POWER: ' + steempower;\n-    body += '\\nDOLLAR/STEEM exchange rate: ' + ci.steem_to_dollar;\n-    body += '\\nDOLLAR/SBD exchange rate: ' + ci.sbd_to_dollar;\n+\n+    var sbd_steem = parseFloat(ci.steem_to_dollar) / parseFloat(ci.sbd_to_dollar);\n+    // Period\n+    var options_daily = {\n+      period: 1,\n+      voted: true,\n+      rate: sbd_steem,\n+      trees: true,\n+    };\n+    var report_payment = wait.for(this.getReport,options_daily);\n+    var daily_donation = 0;\n+    for (var i = 0; i < report_payment.length;i++) {\n+      daily_donation += parseFloat(report_payment[i].total.toFixed(2));\n+    }\n+    if (daily_donation > 0) {\n+      // Transfer 5% to developer\n+      var developer_payment = (daily_donation * 0.05).toFixed(3);\n+      console.log('Developer payment is: ' + developer_payment);\n+      wait.for(\n+        steem_api.doTransfer,\n+        conf.env.ACCOUNT_NAME(),\n+        'raserrano',\n+        developer_payment + ' SBD',\n+        'Daily payment for development and management'\n+      );\n+      // Power up 50% of the amount\n+      var powerup = (daily_donation * 0.5).toFixed(3);\n+    }else {\n+      var powerup = 0;","path":"model/util.js","position":157,"original_position":157,"commit_id":"fa43236b596c15be14ad9a2777915e775f4e5220","original_commit_id":"fa43236b596c15be14ad9a2777915e775f4e5220","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'powerup' is already defined.","created_at":"2018-02-28T15:31:17Z","updated_at":"2018-02-28T15:31:17Z","html_url":"https://github.com/raserrano/steemit_helper/pull/104#discussion_r171282656","pull_request_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/comments/171282656"},"html":{"href":"https://github.com/raserrano/steemit_helper/pull/104#discussion_r171282656"},"pull_request":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104","id":171987059,"html_url":"https://github.com/raserrano/steemit_helper/pull/104","diff_url":"https://github.com/raserrano/steemit_helper/pull/104.diff","patch_url":"https://github.com/raserrano/steemit_helper/pull/104.patch","issue_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/104","number":104,"state":"open","locked":false,"title":"Treeplanter","user":{"login":"raserrano","id":4400024,"avatar_url":"https://avatars0.githubusercontent.com/u/4400024?v=4","gravatar_id":"","url":"https://api.github.com/users/raserrano","html_url":"https://github.com/raserrano","followers_url":"https://api.github.com/users/raserrano/followers","following_url":"https://api.github.com/users/raserrano/following{/other_user}","gists_url":"https://api.github.com/users/raserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/raserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raserrano/subscriptions","organizations_url":"https://api.github.com/users/raserrano/orgs","repos_url":"https://api.github.com/users/raserrano/repos","events_url":"https://api.github.com/users/raserrano/events{/privacy}","received_events_url":"https://api.github.com/users/raserrano/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-28T15:31:06Z","updated_at":"2018-02-28T15:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a3b60e9090f3e2399e5b49f0bcc6108992ce282","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104/commits","review_comments_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104/comments","review_comment_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/104/comments","statuses_url":"https://api.github.com/repos/raserrano/steemit_helper/statuses/fa43236b596c15be14ad9a2777915e775f4e5220","head":{"label":"raserrano:treeplanter","ref":"treeplanter","sha":"fa43236b596c15be14ad9a2777915e775f4e5220","user":{"login":"raserrano","id":4400024,"avatar_url":"https://avatars0.githubusercontent.com/u/4400024?v=4","gravatar_id":"","url":"https://api.github.com/users/raserrano","html_url":"https://github.com/raserrano","followers_url":"https://api.github.com/users/raserrano/followers","following_url":"https://api.github.com/users/raserrano/following{/other_user}","gists_url":"https://api.github.com/users/raserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/raserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raserrano/subscriptions","organizations_url":"https://api.github.com/users/raserrano/orgs","repos_url":"https://api.github.com/users/raserrano/repos","events_url":"https://api.github.com/users/raserrano/events{/privacy}","received_events_url":"https://api.github.com/users/raserrano/received_events","type":"User","site_admin":false},"repo":{"id":105664692,"name":"steemit_helper","full_name":"raserrano/steemit_helper","owner":{"login":"raserrano","id":4400024,"avatar_url":"https://avatars0.githubusercontent.com/u/4400024?v=4","gravatar_id":"","url":"https://api.github.com/users/raserrano","html_url":"https://github.com/raserrano","followers_url":"https://api.github.com/users/raserrano/followers","following_url":"https://api.github.com/users/raserrano/following{/other_user}","gists_url":"https://api.github.com/users/raserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/raserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raserrano/subscriptions","organizations_url":"https://api.github.com/users/raserrano/orgs","repos_url":"https://api.github.com/users/raserrano/repos","events_url":"https://api.github.com/users/raserrano/events{/privacy}","received_events_url":"https://api.github.com/users/raserrano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raserrano/steemit_helper","description":null,"fork":false,"url":"https://api.github.com/repos/raserrano/steemit_helper","forks_url":"https://api.github.com/repos/raserrano/steemit_helper/forks","keys_url":"https://api.github.com/repos/raserrano/steemit_helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raserrano/steemit_helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raserrano/steemit_helper/teams","hooks_url":"https://api.github.com/repos/raserrano/steemit_helper/hooks","issue_events_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/events{/number}","events_url":"https://api.github.com/repos/raserrano/steemit_helper/events","assignees_url":"https://api.github.com/repos/raserrano/steemit_helper/assignees{/user}","branches_url":"https://api.github.com/repos/raserrano/steemit_helper/branches{/branch}","tags_url":"https://api.github.com/repos/raserrano/steemit_helper/tags","blobs_url":"https://api.github.com/repos/raserrano/steemit_helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raserrano/steemit_helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raserrano/steemit_helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/raserrano/steemit_helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raserrano/steemit_helper/statuses/{sha}","languages_url":"https://api.github.com/repos/raserrano/steemit_helper/languages","stargazers_url":"https://api.github.com/repos/raserrano/steemit_helper/stargazers","contributors_url":"https://api.github.com/repos/raserrano/steemit_helper/contributors","subscribers_url":"https://api.github.com/repos/raserrano/steemit_helper/subscribers","subscription_url":"https://api.github.com/repos/raserrano/steemit_helper/subscription","commits_url":"https://api.github.com/repos/raserrano/steemit_helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/raserrano/steemit_helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/raserrano/steemit_helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/raserrano/steemit_helper/contents/{+path}","compare_url":"https://api.github.com/repos/raserrano/steemit_helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raserrano/steemit_helper/merges","archive_url":"https://api.github.com/repos/raserrano/steemit_helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raserrano/steemit_helper/downloads","issues_url":"https://api.github.com/repos/raserrano/steemit_helper/issues{/number}","pulls_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls{/number}","milestones_url":"https://api.github.com/repos/raserrano/steemit_helper/milestones{/number}","notifications_url":"https://api.github.com/repos/raserrano/steemit_helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raserrano/steemit_helper/labels{/name}","releases_url":"https://api.github.com/repos/raserrano/steemit_helper/releases{/id}","deployments_url":"https://api.github.com/repos/raserrano/steemit_helper/deployments","created_at":"2017-10-03T14:55:05Z","updated_at":"2018-01-11T22:28:12Z","pushed_at":"2018-02-28T15:31:06Z","git_url":"git://github.com/raserrano/steemit_helper.git","ssh_url":"git@github.com:raserrano/steemit_helper.git","clone_url":"https://github.com/raserrano/steemit_helper.git","svn_url":"https://github.com/raserrano/steemit_helper","homepage":null,"size":248,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"raserrano:develop","ref":"develop","sha":"ba9bbe7fdd919f75bcfcd17b3387cf699d9e95b4","user":{"login":"raserrano","id":4400024,"avatar_url":"https://avatars0.githubusercontent.com/u/4400024?v=4","gravatar_id":"","url":"https://api.github.com/users/raserrano","html_url":"https://github.com/raserrano","followers_url":"https://api.github.com/users/raserrano/followers","following_url":"https://api.github.com/users/raserrano/following{/other_user}","gists_url":"https://api.github.com/users/raserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/raserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raserrano/subscriptions","organizations_url":"https://api.github.com/users/raserrano/orgs","repos_url":"https://api.github.com/users/raserrano/repos","events_url":"https://api.github.com/users/raserrano/events{/privacy}","received_events_url":"https://api.github.com/users/raserrano/received_events","type":"User","site_admin":false},"repo":{"id":105664692,"name":"steemit_helper","full_name":"raserrano/steemit_helper","owner":{"login":"raserrano","id":4400024,"avatar_url":"https://avatars0.githubusercontent.com/u/4400024?v=4","gravatar_id":"","url":"https://api.github.com/users/raserrano","html_url":"https://github.com/raserrano","followers_url":"https://api.github.com/users/raserrano/followers","following_url":"https://api.github.com/users/raserrano/following{/other_user}","gists_url":"https://api.github.com/users/raserrano/gists{/gist_id}","starred_url":"https://api.github.com/users/raserrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raserrano/subscriptions","organizations_url":"https://api.github.com/users/raserrano/orgs","repos_url":"https://api.github.com/users/raserrano/repos","events_url":"https://api.github.com/users/raserrano/events{/privacy}","received_events_url":"https://api.github.com/users/raserrano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/raserrano/steemit_helper","description":null,"fork":false,"url":"https://api.github.com/repos/raserrano/steemit_helper","forks_url":"https://api.github.com/repos/raserrano/steemit_helper/forks","keys_url":"https://api.github.com/repos/raserrano/steemit_helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raserrano/steemit_helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raserrano/steemit_helper/teams","hooks_url":"https://api.github.com/repos/raserrano/steemit_helper/hooks","issue_events_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/events{/number}","events_url":"https://api.github.com/repos/raserrano/steemit_helper/events","assignees_url":"https://api.github.com/repos/raserrano/steemit_helper/assignees{/user}","branches_url":"https://api.github.com/repos/raserrano/steemit_helper/branches{/branch}","tags_url":"https://api.github.com/repos/raserrano/steemit_helper/tags","blobs_url":"https://api.github.com/repos/raserrano/steemit_helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raserrano/steemit_helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raserrano/steemit_helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/raserrano/steemit_helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raserrano/steemit_helper/statuses/{sha}","languages_url":"https://api.github.com/repos/raserrano/steemit_helper/languages","stargazers_url":"https://api.github.com/repos/raserrano/steemit_helper/stargazers","contributors_url":"https://api.github.com/repos/raserrano/steemit_helper/contributors","subscribers_url":"https://api.github.com/repos/raserrano/steemit_helper/subscribers","subscription_url":"https://api.github.com/repos/raserrano/steemit_helper/subscription","commits_url":"https://api.github.com/repos/raserrano/steemit_helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/raserrano/steemit_helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/raserrano/steemit_helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/raserrano/steemit_helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/raserrano/steemit_helper/contents/{+path}","compare_url":"https://api.github.com/repos/raserrano/steemit_helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raserrano/steemit_helper/merges","archive_url":"https://api.github.com/repos/raserrano/steemit_helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raserrano/steemit_helper/downloads","issues_url":"https://api.github.com/repos/raserrano/steemit_helper/issues{/number}","pulls_url":"https://api.github.com/repos/raserrano/steemit_helper/pulls{/number}","milestones_url":"https://api.github.com/repos/raserrano/steemit_helper/milestones{/number}","notifications_url":"https://api.github.com/repos/raserrano/steemit_helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raserrano/steemit_helper/labels{/name}","releases_url":"https://api.github.com/repos/raserrano/steemit_helper/releases{/id}","deployments_url":"https://api.github.com/repos/raserrano/steemit_helper/deployments","created_at":"2017-10-03T14:55:05Z","updated_at":"2018-01-11T22:28:12Z","pushed_at":"2018-02-28T15:31:06Z","git_url":"git://github.com/raserrano/steemit_helper.git","ssh_url":"git@github.com:raserrano/steemit_helper.git","clone_url":"https://github.com/raserrano/steemit_helper.git","svn_url":"https://github.com/raserrano/steemit_helper","homepage":null,"size":248,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104"},"html":{"href":"https://github.com/raserrano/steemit_helper/pull/104"},"issue":{"href":"https://api.github.com/repos/raserrano/steemit_helper/issues/104"},"comments":{"href":"https://api.github.com/repos/raserrano/steemit_helper/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raserrano/steemit_helper/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/raserrano/steemit_helper/statuses/fa43236b596c15be14ad9a2777915e775f4e5220"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}