{"action":"created","comment":{"url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/comments/76740411","id":76740411,"diff_hunk":"@@ -0,0 +1,3 @@\n+import MailerService from 'sails-service-mailer';\n+console.log(\"=== MailerService ===\", sails.config.mail.type);\n+module.exports = MailerService(sails.config.mail.type, sails.config.mail.config);","path":"api/services/MailerService.js","position":3,"original_position":3,"commit_id":"b2fb0598eb94097ccd2bbccf8ccc9326ef02ca5a","original_commit_id":"b2fb0598eb94097ccd2bbccf8ccc9326ef02ca5a","user":{"login":"smlsunxie","id":1689227,"avatar_url":"https://avatars.githubusercontent.com/u/1689227?v=3","gravatar_id":"","url":"https://api.github.com/users/smlsunxie","html_url":"https://github.com/smlsunxie","followers_url":"https://api.github.com/users/smlsunxie/followers","following_url":"https://api.github.com/users/smlsunxie/following{/other_user}","gists_url":"https://api.github.com/users/smlsunxie/gists{/gist_id}","starred_url":"https://api.github.com/users/smlsunxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smlsunxie/subscriptions","organizations_url":"https://api.github.com/users/smlsunxie/orgs","repos_url":"https://api.github.com/users/smlsunxie/repos","events_url":"https://api.github.com/users/smlsunxie/events{/privacy}","received_events_url":"https://api.github.com/users/smlsunxie/received_events","type":"User","site_admin":false},"body":"共用 library 可以用這樣的方式作為 Service 使用","created_at":"2016-08-30T07:08:52Z","updated_at":"2016-08-30T07:08:52Z","html_url":"https://github.com/trunk-studio/cargocms/pull/299#discussion_r76740411","pull_request_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299","_links":{"self":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/comments/76740411"},"html":{"href":"https://github.com/trunk-studio/cargocms/pull/299#discussion_r76740411"},"pull_request":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299"}}},"pull_request":{"url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299","id":83108389,"html_url":"https://github.com/trunk-studio/cargocms/pull/299","diff_url":"https://github.com/trunk-studio/cargocms/pull/299.diff","patch_url":"https://github.com/trunk-studio/cargocms/pull/299.patch","issue_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/299","number":299,"state":"open","locked":false,"title":"add mailer","user":{"login":"smlsunxie","id":1689227,"avatar_url":"https://avatars.githubusercontent.com/u/1689227?v=3","gravatar_id":"","url":"https://api.github.com/users/smlsunxie","html_url":"https://github.com/smlsunxie","followers_url":"https://api.github.com/users/smlsunxie/followers","following_url":"https://api.github.com/users/smlsunxie/following{/other_user}","gists_url":"https://api.github.com/users/smlsunxie/gists{/gist_id}","starred_url":"https://api.github.com/users/smlsunxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smlsunxie/subscriptions","organizations_url":"https://api.github.com/users/smlsunxie/orgs","repos_url":"https://api.github.com/users/smlsunxie/repos","events_url":"https://api.github.com/users/smlsunxie/events{/privacy}","received_events_url":"https://api.github.com/users/smlsunxie/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-29T14:30:13Z","updated_at":"2016-08-30T07:08:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c3d2fcc695108d60fcc44d31be8826685425989","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299/commits","review_comments_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299/comments","review_comment_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/299/comments","statuses_url":"https://api.github.com/repos/trunk-studio/cargocms/statuses/b2fb0598eb94097ccd2bbccf8ccc9326ef02ca5a","head":{"label":"trunk-studio:feature/mail","ref":"feature/mail","sha":"b2fb0598eb94097ccd2bbccf8ccc9326ef02ca5a","user":{"login":"trunk-studio","id":12459749,"avatar_url":"https://avatars.githubusercontent.com/u/12459749?v=3","gravatar_id":"","url":"https://api.github.com/users/trunk-studio","html_url":"https://github.com/trunk-studio","followers_url":"https://api.github.com/users/trunk-studio/followers","following_url":"https://api.github.com/users/trunk-studio/following{/other_user}","gists_url":"https://api.github.com/users/trunk-studio/gists{/gist_id}","starred_url":"https://api.github.com/users/trunk-studio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trunk-studio/subscriptions","organizations_url":"https://api.github.com/users/trunk-studio/orgs","repos_url":"https://api.github.com/users/trunk-studio/repos","events_url":"https://api.github.com/users/trunk-studio/events{/privacy}","received_events_url":"https://api.github.com/users/trunk-studio/received_events","type":"Organization","site_admin":false},"repo":{"id":63765534,"name":"cargocms","full_name":"trunk-studio/cargocms","owner":{"login":"trunk-studio","id":12459749,"avatar_url":"https://avatars.githubusercontent.com/u/12459749?v=3","gravatar_id":"","url":"https://api.github.com/users/trunk-studio","html_url":"https://github.com/trunk-studio","followers_url":"https://api.github.com/users/trunk-studio/followers","following_url":"https://api.github.com/users/trunk-studio/following{/other_user}","gists_url":"https://api.github.com/users/trunk-studio/gists{/gist_id}","starred_url":"https://api.github.com/users/trunk-studio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trunk-studio/subscriptions","organizations_url":"https://api.github.com/users/trunk-studio/orgs","repos_url":"https://api.github.com/users/trunk-studio/repos","events_url":"https://api.github.com/users/trunk-studio/events{/privacy}","received_events_url":"https://api.github.com/users/trunk-studio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trunk-studio/cargocms","description":"Cargo CMS","fork":false,"url":"https://api.github.com/repos/trunk-studio/cargocms","forks_url":"https://api.github.com/repos/trunk-studio/cargocms/forks","keys_url":"https://api.github.com/repos/trunk-studio/cargocms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trunk-studio/cargocms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trunk-studio/cargocms/teams","hooks_url":"https://api.github.com/repos/trunk-studio/cargocms/hooks","issue_events_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/events{/number}","events_url":"https://api.github.com/repos/trunk-studio/cargocms/events","assignees_url":"https://api.github.com/repos/trunk-studio/cargocms/assignees{/user}","branches_url":"https://api.github.com/repos/trunk-studio/cargocms/branches{/branch}","tags_url":"https://api.github.com/repos/trunk-studio/cargocms/tags","blobs_url":"https://api.github.com/repos/trunk-studio/cargocms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trunk-studio/cargocms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trunk-studio/cargocms/git/refs{/sha}","trees_url":"https://api.github.com/repos/trunk-studio/cargocms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trunk-studio/cargocms/statuses/{sha}","languages_url":"https://api.github.com/repos/trunk-studio/cargocms/languages","stargazers_url":"https://api.github.com/repos/trunk-studio/cargocms/stargazers","contributors_url":"https://api.github.com/repos/trunk-studio/cargocms/contributors","subscribers_url":"https://api.github.com/repos/trunk-studio/cargocms/subscribers","subscription_url":"https://api.github.com/repos/trunk-studio/cargocms/subscription","commits_url":"https://api.github.com/repos/trunk-studio/cargocms/commits{/sha}","git_commits_url":"https://api.github.com/repos/trunk-studio/cargocms/git/commits{/sha}","comments_url":"https://api.github.com/repos/trunk-studio/cargocms/comments{/number}","issue_comment_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/comments{/number}","contents_url":"https://api.github.com/repos/trunk-studio/cargocms/contents/{+path}","compare_url":"https://api.github.com/repos/trunk-studio/cargocms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trunk-studio/cargocms/merges","archive_url":"https://api.github.com/repos/trunk-studio/cargocms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trunk-studio/cargocms/downloads","issues_url":"https://api.github.com/repos/trunk-studio/cargocms/issues{/number}","pulls_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls{/number}","milestones_url":"https://api.github.com/repos/trunk-studio/cargocms/milestones{/number}","notifications_url":"https://api.github.com/repos/trunk-studio/cargocms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trunk-studio/cargocms/labels{/name}","releases_url":"https://api.github.com/repos/trunk-studio/cargocms/releases{/id}","deployments_url":"https://api.github.com/repos/trunk-studio/cargocms/deployments","created_at":"2016-07-20T08:45:49Z","updated_at":"2016-07-28T09:56:09Z","pushed_at":"2016-08-30T02:05:39Z","git_url":"git://github.com/trunk-studio/cargocms.git","ssh_url":"git@github.com:trunk-studio/cargocms.git","clone_url":"https://github.com/trunk-studio/cargocms.git","svn_url":"https://github.com/trunk-studio/cargocms","homepage":"http://cargo.trunksys.com","size":61747,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":77,"forks":9,"open_issues":77,"watchers":0,"default_branch":"master"}},"base":{"label":"trunk-studio:develop","ref":"develop","sha":"4ed8f9e05fbde3278a902b54a3bad9d16cd1e191","user":{"login":"trunk-studio","id":12459749,"avatar_url":"https://avatars.githubusercontent.com/u/12459749?v=3","gravatar_id":"","url":"https://api.github.com/users/trunk-studio","html_url":"https://github.com/trunk-studio","followers_url":"https://api.github.com/users/trunk-studio/followers","following_url":"https://api.github.com/users/trunk-studio/following{/other_user}","gists_url":"https://api.github.com/users/trunk-studio/gists{/gist_id}","starred_url":"https://api.github.com/users/trunk-studio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trunk-studio/subscriptions","organizations_url":"https://api.github.com/users/trunk-studio/orgs","repos_url":"https://api.github.com/users/trunk-studio/repos","events_url":"https://api.github.com/users/trunk-studio/events{/privacy}","received_events_url":"https://api.github.com/users/trunk-studio/received_events","type":"Organization","site_admin":false},"repo":{"id":63765534,"name":"cargocms","full_name":"trunk-studio/cargocms","owner":{"login":"trunk-studio","id":12459749,"avatar_url":"https://avatars.githubusercontent.com/u/12459749?v=3","gravatar_id":"","url":"https://api.github.com/users/trunk-studio","html_url":"https://github.com/trunk-studio","followers_url":"https://api.github.com/users/trunk-studio/followers","following_url":"https://api.github.com/users/trunk-studio/following{/other_user}","gists_url":"https://api.github.com/users/trunk-studio/gists{/gist_id}","starred_url":"https://api.github.com/users/trunk-studio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trunk-studio/subscriptions","organizations_url":"https://api.github.com/users/trunk-studio/orgs","repos_url":"https://api.github.com/users/trunk-studio/repos","events_url":"https://api.github.com/users/trunk-studio/events{/privacy}","received_events_url":"https://api.github.com/users/trunk-studio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trunk-studio/cargocms","description":"Cargo CMS","fork":false,"url":"https://api.github.com/repos/trunk-studio/cargocms","forks_url":"https://api.github.com/repos/trunk-studio/cargocms/forks","keys_url":"https://api.github.com/repos/trunk-studio/cargocms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trunk-studio/cargocms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trunk-studio/cargocms/teams","hooks_url":"https://api.github.com/repos/trunk-studio/cargocms/hooks","issue_events_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/events{/number}","events_url":"https://api.github.com/repos/trunk-studio/cargocms/events","assignees_url":"https://api.github.com/repos/trunk-studio/cargocms/assignees{/user}","branches_url":"https://api.github.com/repos/trunk-studio/cargocms/branches{/branch}","tags_url":"https://api.github.com/repos/trunk-studio/cargocms/tags","blobs_url":"https://api.github.com/repos/trunk-studio/cargocms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trunk-studio/cargocms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trunk-studio/cargocms/git/refs{/sha}","trees_url":"https://api.github.com/repos/trunk-studio/cargocms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trunk-studio/cargocms/statuses/{sha}","languages_url":"https://api.github.com/repos/trunk-studio/cargocms/languages","stargazers_url":"https://api.github.com/repos/trunk-studio/cargocms/stargazers","contributors_url":"https://api.github.com/repos/trunk-studio/cargocms/contributors","subscribers_url":"https://api.github.com/repos/trunk-studio/cargocms/subscribers","subscription_url":"https://api.github.com/repos/trunk-studio/cargocms/subscription","commits_url":"https://api.github.com/repos/trunk-studio/cargocms/commits{/sha}","git_commits_url":"https://api.github.com/repos/trunk-studio/cargocms/git/commits{/sha}","comments_url":"https://api.github.com/repos/trunk-studio/cargocms/comments{/number}","issue_comment_url":"https://api.github.com/repos/trunk-studio/cargocms/issues/comments{/number}","contents_url":"https://api.github.com/repos/trunk-studio/cargocms/contents/{+path}","compare_url":"https://api.github.com/repos/trunk-studio/cargocms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trunk-studio/cargocms/merges","archive_url":"https://api.github.com/repos/trunk-studio/cargocms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trunk-studio/cargocms/downloads","issues_url":"https://api.github.com/repos/trunk-studio/cargocms/issues{/number}","pulls_url":"https://api.github.com/repos/trunk-studio/cargocms/pulls{/number}","milestones_url":"https://api.github.com/repos/trunk-studio/cargocms/milestones{/number}","notifications_url":"https://api.github.com/repos/trunk-studio/cargocms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trunk-studio/cargocms/labels{/name}","releases_url":"https://api.github.com/repos/trunk-studio/cargocms/releases{/id}","deployments_url":"https://api.github.com/repos/trunk-studio/cargocms/deployments","created_at":"2016-07-20T08:45:49Z","updated_at":"2016-07-28T09:56:09Z","pushed_at":"2016-08-30T02:05:39Z","git_url":"git://github.com/trunk-studio/cargocms.git","ssh_url":"git@github.com:trunk-studio/cargocms.git","clone_url":"https://github.com/trunk-studio/cargocms.git","svn_url":"https://github.com/trunk-studio/cargocms","homepage":"http://cargo.trunksys.com","size":61747,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":77,"forks":9,"open_issues":77,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299"},"html":{"href":"https://github.com/trunk-studio/cargocms/pull/299"},"issue":{"href":"https://api.github.com/repos/trunk-studio/cargocms/issues/299"},"comments":{"href":"https://api.github.com/repos/trunk-studio/cargocms/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trunk-studio/cargocms/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/trunk-studio/cargocms/statuses/b2fb0598eb94097ccd2bbccf8ccc9326ef02ca5a"}}}}
{"actor":{"display_login":"smlsunxie"}}