{"action":"created","comment":{"url":"https://api.github.com/repos/thegameofcode/resonator/pulls/comments/40306212","id":40306212,"diff_hunk":"@@ -3,16 +3,18 @@ var request = require('request');\n \n var MAILGUN_MESSAGES_URL = 'https://api.mailgun.net/v3/' + config.get('transport.mailgun.domain') + '/messages';\n var MAILGUN_PASS = config.get('transport.mailgun.apiKey');\n+var log = require('../util/logger');\n \n function sendEmails(emails, content, callback) {\n \n   var data = {\n-    to: emails,\n+    to: emails || [content.to],","path":"lib/transport/mailgun.js","position":10,"original_position":10,"commit_id":"fe3e22ad53440de4e6db8f09b8b60c2a3d6e4938","original_commit_id":"fe3e22ad53440de4e6db8f09b8b60c2a3d6e4938","user":{"login":"guumaster","id":765396,"avatar_url":"https://avatars.githubusercontent.com/u/765396?v=3","gravatar_id":"","url":"https://api.github.com/users/guumaster","html_url":"https://github.com/guumaster","followers_url":"https://api.github.com/users/guumaster/followers","following_url":"https://api.github.com/users/guumaster/following{/other_user}","gists_url":"https://api.github.com/users/guumaster/gists{/gist_id}","starred_url":"https://api.github.com/users/guumaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guumaster/subscriptions","organizations_url":"https://api.github.com/users/guumaster/orgs","repos_url":"https://api.github.com/users/guumaster/repos","events_url":"https://api.github.com/users/guumaster/events{/privacy}","received_events_url":"https://api.github.com/users/guumaster/received_events","type":"User","site_admin":false},"body":"this optional `[content.to]` is not necessary, every call to sendEmails should receive emails on the first parameter.","created_at":"2015-09-24T10:46:00Z","updated_at":"2015-09-24T10:46:00Z","html_url":"https://github.com/thegameofcode/resonator/pull/38#discussion_r40306212","pull_request_url":"https://api.github.com/repos/thegameofcode/resonator/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/comments/40306212"},"html":{"href":"https://github.com/thegameofcode/resonator/pull/38#discussion_r40306212"},"pull_request":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/thegameofcode/resonator/pulls/38","id":45876642,"html_url":"https://github.com/thegameofcode/resonator/pull/38","diff_url":"https://github.com/thegameofcode/resonator/pull/38.diff","patch_url":"https://github.com/thegameofcode/resonator/pull/38.patch","issue_url":"https://api.github.com/repos/thegameofcode/resonator/issues/38","number":38,"state":"open","locked":false,"title":"Feature/single email endpoint","user":{"login":"nick13jaremek","id":2492525,"avatar_url":"https://avatars.githubusercontent.com/u/2492525?v=3","gravatar_id":"","url":"https://api.github.com/users/nick13jaremek","html_url":"https://github.com/nick13jaremek","followers_url":"https://api.github.com/users/nick13jaremek/followers","following_url":"https://api.github.com/users/nick13jaremek/following{/other_user}","gists_url":"https://api.github.com/users/nick13jaremek/gists{/gist_id}","starred_url":"https://api.github.com/users/nick13jaremek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick13jaremek/subscriptions","organizations_url":"https://api.github.com/users/nick13jaremek/orgs","repos_url":"https://api.github.com/users/nick13jaremek/repos","events_url":"https://api.github.com/users/nick13jaremek/events{/privacy}","received_events_url":"https://api.github.com/users/nick13jaremek/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-24T09:36:09Z","updated_at":"2015-09-24T10:46:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7b0a2ff0c08ccccbeb45fc152e757a69bdd5231","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thegameofcode/resonator/pulls/38/commits","review_comments_url":"https://api.github.com/repos/thegameofcode/resonator/pulls/38/comments","review_comment_url":"https://api.github.com/repos/thegameofcode/resonator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thegameofcode/resonator/issues/38/comments","statuses_url":"https://api.github.com/repos/thegameofcode/resonator/statuses/fe3e22ad53440de4e6db8f09b8b60c2a3d6e4938","head":{"label":"nick13jaremek:feature/single-email-endpoint","ref":"feature/single-email-endpoint","sha":"fe3e22ad53440de4e6db8f09b8b60c2a3d6e4938","user":{"login":"nick13jaremek","id":2492525,"avatar_url":"https://avatars.githubusercontent.com/u/2492525?v=3","gravatar_id":"","url":"https://api.github.com/users/nick13jaremek","html_url":"https://github.com/nick13jaremek","followers_url":"https://api.github.com/users/nick13jaremek/followers","following_url":"https://api.github.com/users/nick13jaremek/following{/other_user}","gists_url":"https://api.github.com/users/nick13jaremek/gists{/gist_id}","starred_url":"https://api.github.com/users/nick13jaremek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick13jaremek/subscriptions","organizations_url":"https://api.github.com/users/nick13jaremek/orgs","repos_url":"https://api.github.com/users/nick13jaremek/repos","events_url":"https://api.github.com/users/nick13jaremek/events{/privacy}","received_events_url":"https://api.github.com/users/nick13jaremek/received_events","type":"User","site_admin":false},"repo":{"id":39073877,"name":"resonator","full_name":"nick13jaremek/resonator","owner":{"login":"nick13jaremek","id":2492525,"avatar_url":"https://avatars.githubusercontent.com/u/2492525?v=3","gravatar_id":"","url":"https://api.github.com/users/nick13jaremek","html_url":"https://github.com/nick13jaremek","followers_url":"https://api.github.com/users/nick13jaremek/followers","following_url":"https://api.github.com/users/nick13jaremek/following{/other_user}","gists_url":"https://api.github.com/users/nick13jaremek/gists{/gist_id}","starred_url":"https://api.github.com/users/nick13jaremek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick13jaremek/subscriptions","organizations_url":"https://api.github.com/users/nick13jaremek/orgs","repos_url":"https://api.github.com/users/nick13jaremek/repos","events_url":"https://api.github.com/users/nick13jaremek/events{/privacy}","received_events_url":"https://api.github.com/users/nick13jaremek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nick13jaremek/resonator","description":"Nodejs microservice that allows to send email, sms & push notifications easily","fork":true,"url":"https://api.github.com/repos/nick13jaremek/resonator","forks_url":"https://api.github.com/repos/nick13jaremek/resonator/forks","keys_url":"https://api.github.com/repos/nick13jaremek/resonator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nick13jaremek/resonator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nick13jaremek/resonator/teams","hooks_url":"https://api.github.com/repos/nick13jaremek/resonator/hooks","issue_events_url":"https://api.github.com/repos/nick13jaremek/resonator/issues/events{/number}","events_url":"https://api.github.com/repos/nick13jaremek/resonator/events","assignees_url":"https://api.github.com/repos/nick13jaremek/resonator/assignees{/user}","branches_url":"https://api.github.com/repos/nick13jaremek/resonator/branches{/branch}","tags_url":"https://api.github.com/repos/nick13jaremek/resonator/tags","blobs_url":"https://api.github.com/repos/nick13jaremek/resonator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nick13jaremek/resonator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nick13jaremek/resonator/git/refs{/sha}","trees_url":"https://api.github.com/repos/nick13jaremek/resonator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nick13jaremek/resonator/statuses/{sha}","languages_url":"https://api.github.com/repos/nick13jaremek/resonator/languages","stargazers_url":"https://api.github.com/repos/nick13jaremek/resonator/stargazers","contributors_url":"https://api.github.com/repos/nick13jaremek/resonator/contributors","subscribers_url":"https://api.github.com/repos/nick13jaremek/resonator/subscribers","subscription_url":"https://api.github.com/repos/nick13jaremek/resonator/subscription","commits_url":"https://api.github.com/repos/nick13jaremek/resonator/commits{/sha}","git_commits_url":"https://api.github.com/repos/nick13jaremek/resonator/git/commits{/sha}","comments_url":"https://api.github.com/repos/nick13jaremek/resonator/comments{/number}","issue_comment_url":"https://api.github.com/repos/nick13jaremek/resonator/issues/comments{/number}","contents_url":"https://api.github.com/repos/nick13jaremek/resonator/contents/{+path}","compare_url":"https://api.github.com/repos/nick13jaremek/resonator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nick13jaremek/resonator/merges","archive_url":"https://api.github.com/repos/nick13jaremek/resonator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nick13jaremek/resonator/downloads","issues_url":"https://api.github.com/repos/nick13jaremek/resonator/issues{/number}","pulls_url":"https://api.github.com/repos/nick13jaremek/resonator/pulls{/number}","milestones_url":"https://api.github.com/repos/nick13jaremek/resonator/milestones{/number}","notifications_url":"https://api.github.com/repos/nick13jaremek/resonator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nick13jaremek/resonator/labels{/name}","releases_url":"https://api.github.com/repos/nick13jaremek/resonator/releases{/id}","created_at":"2015-07-14T12:36:33Z","updated_at":"2015-07-14T12:36:33Z","pushed_at":"2015-09-24T09:35:51Z","git_url":"git://github.com/nick13jaremek/resonator.git","ssh_url":"git@github.com:nick13jaremek/resonator.git","clone_url":"https://github.com/nick13jaremek/resonator.git","svn_url":"https://github.com/nick13jaremek/resonator","homepage":null,"size":378,"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":"thegameofcode:master","ref":"master","sha":"d48125e36e2e22845dbe5a90b8ead899ab9454e8","user":{"login":"thegameofcode","id":2744474,"avatar_url":"https://avatars.githubusercontent.com/u/2744474?v=3","gravatar_id":"","url":"https://api.github.com/users/thegameofcode","html_url":"https://github.com/thegameofcode","followers_url":"https://api.github.com/users/thegameofcode/followers","following_url":"https://api.github.com/users/thegameofcode/following{/other_user}","gists_url":"https://api.github.com/users/thegameofcode/gists{/gist_id}","starred_url":"https://api.github.com/users/thegameofcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegameofcode/subscriptions","organizations_url":"https://api.github.com/users/thegameofcode/orgs","repos_url":"https://api.github.com/users/thegameofcode/repos","events_url":"https://api.github.com/users/thegameofcode/events{/privacy}","received_events_url":"https://api.github.com/users/thegameofcode/received_events","type":"Organization","site_admin":false},"repo":{"id":37686909,"name":"resonator","full_name":"thegameofcode/resonator","owner":{"login":"thegameofcode","id":2744474,"avatar_url":"https://avatars.githubusercontent.com/u/2744474?v=3","gravatar_id":"","url":"https://api.github.com/users/thegameofcode","html_url":"https://github.com/thegameofcode","followers_url":"https://api.github.com/users/thegameofcode/followers","following_url":"https://api.github.com/users/thegameofcode/following{/other_user}","gists_url":"https://api.github.com/users/thegameofcode/gists{/gist_id}","starred_url":"https://api.github.com/users/thegameofcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thegameofcode/subscriptions","organizations_url":"https://api.github.com/users/thegameofcode/orgs","repos_url":"https://api.github.com/users/thegameofcode/repos","events_url":"https://api.github.com/users/thegameofcode/events{/privacy}","received_events_url":"https://api.github.com/users/thegameofcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thegameofcode/resonator","description":"Nodejs microservice that allows to send email, sms & push notifications easily","fork":false,"url":"https://api.github.com/repos/thegameofcode/resonator","forks_url":"https://api.github.com/repos/thegameofcode/resonator/forks","keys_url":"https://api.github.com/repos/thegameofcode/resonator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thegameofcode/resonator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thegameofcode/resonator/teams","hooks_url":"https://api.github.com/repos/thegameofcode/resonator/hooks","issue_events_url":"https://api.github.com/repos/thegameofcode/resonator/issues/events{/number}","events_url":"https://api.github.com/repos/thegameofcode/resonator/events","assignees_url":"https://api.github.com/repos/thegameofcode/resonator/assignees{/user}","branches_url":"https://api.github.com/repos/thegameofcode/resonator/branches{/branch}","tags_url":"https://api.github.com/repos/thegameofcode/resonator/tags","blobs_url":"https://api.github.com/repos/thegameofcode/resonator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thegameofcode/resonator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thegameofcode/resonator/git/refs{/sha}","trees_url":"https://api.github.com/repos/thegameofcode/resonator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thegameofcode/resonator/statuses/{sha}","languages_url":"https://api.github.com/repos/thegameofcode/resonator/languages","stargazers_url":"https://api.github.com/repos/thegameofcode/resonator/stargazers","contributors_url":"https://api.github.com/repos/thegameofcode/resonator/contributors","subscribers_url":"https://api.github.com/repos/thegameofcode/resonator/subscribers","subscription_url":"https://api.github.com/repos/thegameofcode/resonator/subscription","commits_url":"https://api.github.com/repos/thegameofcode/resonator/commits{/sha}","git_commits_url":"https://api.github.com/repos/thegameofcode/resonator/git/commits{/sha}","comments_url":"https://api.github.com/repos/thegameofcode/resonator/comments{/number}","issue_comment_url":"https://api.github.com/repos/thegameofcode/resonator/issues/comments{/number}","contents_url":"https://api.github.com/repos/thegameofcode/resonator/contents/{+path}","compare_url":"https://api.github.com/repos/thegameofcode/resonator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thegameofcode/resonator/merges","archive_url":"https://api.github.com/repos/thegameofcode/resonator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thegameofcode/resonator/downloads","issues_url":"https://api.github.com/repos/thegameofcode/resonator/issues{/number}","pulls_url":"https://api.github.com/repos/thegameofcode/resonator/pulls{/number}","milestones_url":"https://api.github.com/repos/thegameofcode/resonator/milestones{/number}","notifications_url":"https://api.github.com/repos/thegameofcode/resonator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thegameofcode/resonator/labels{/name}","releases_url":"https://api.github.com/repos/thegameofcode/resonator/releases{/id}","created_at":"2015-06-18T21:46:23Z","updated_at":"2015-09-23T00:13:23Z","pushed_at":"2015-09-24T09:36:09Z","git_url":"git://github.com/thegameofcode/resonator.git","ssh_url":"git@github.com:thegameofcode/resonator.git","clone_url":"https://github.com/thegameofcode/resonator.git","svn_url":"https://github.com/thegameofcode/resonator","homepage":null,"size":488,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/38"},"html":{"href":"https://github.com/thegameofcode/resonator/pull/38"},"issue":{"href":"https://api.github.com/repos/thegameofcode/resonator/issues/38"},"comments":{"href":"https://api.github.com/repos/thegameofcode/resonator/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thegameofcode/resonator/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/thegameofcode/resonator/statuses/fe3e22ad53440de4e6db8f09b8b60c2a3d6e4938"}}}}