{"action":"created","comment":{"url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/comments/52951634","id":52951634,"diff_hunk":"@@ -1 +1,37 @@\n // Please use async lib https://github.com/caolan/async\n+var fs = require('fs');\n+var debug = require('debug')('hello');\n+var parse = require('csv-parse');\n+var async = require('async');\n+var helper = require('./helper');\n+\n+var parser = parse({delimiter: ','}, function (err, data) {\n+    async.eachSeries(data, function (line, callback) {\n+        helper.transformField(line);\n+        helper.sendSms(line,afterSending);\n+    });\n+});\n+fs.createReadStream(__dirname+'/sample.csv').pipe(parser);\n+\n+\n+\n+\n+\n+function afterSending(err, sendingStatus) {\n+    var lineToLog;\n+    if (err) {\n+        debug(err.message);\n+\n+        lineToLog = {\n+            sendingStatus,\n+            record,\n+        };\n+        if(LineToLog){","path":"parse-async.js","position":29,"original_position":29,"commit_id":"fee3a57c8ac5993d0f3028cb3869393dd3ea43da","original_commit_id":"fee3a57c8ac5993d0f3028cb3869393dd3ea43da","user":{"login":"diorahman","id":1234972,"avatar_url":"https://avatars.githubusercontent.com/u/1234972?v=3","gravatar_id":"","url":"https://api.github.com/users/diorahman","html_url":"https://github.com/diorahman","followers_url":"https://api.github.com/users/diorahman/followers","following_url":"https://api.github.com/users/diorahman/following{/other_user}","gists_url":"https://api.github.com/users/diorahman/gists{/gist_id}","starred_url":"https://api.github.com/users/diorahman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diorahman/subscriptions","organizations_url":"https://api.github.com/users/diorahman/orgs","repos_url":"https://api.github.com/users/diorahman/repos","events_url":"https://api.github.com/users/diorahman/events{/privacy}","received_events_url":"https://api.github.com/users/diorahman/received_events","type":"User","site_admin":false},"body":"This certainly a bug.\r\n\r\nAt least there are two things:\r\n1. This block of code only being called when there is an `err`.\r\n2. `LineToLog` with capital `L` is not defined everywhere.","created_at":"2016-02-15T23:01:25Z","updated_at":"2016-02-15T23:01:25Z","html_url":"https://github.com/HOOQsters/hello-csv/pull/1#discussion_r52951634","pull_request_url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/comments/52951634"},"html":{"href":"https://github.com/HOOQsters/hello-csv/pull/1#discussion_r52951634"},"pull_request":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1","id":59405366,"html_url":"https://github.com/HOOQsters/hello-csv/pull/1","diff_url":"https://github.com/HOOQsters/hello-csv/pull/1.diff","patch_url":"https://github.com/HOOQsters/hello-csv/pull/1.patch","issue_url":"https://api.github.com/repos/HOOQsters/hello-csv/issues/1","number":1,"state":"open","locked":false,"title":"hooq test","user":{"login":"ashrayas","id":11660544,"avatar_url":"https://avatars.githubusercontent.com/u/11660544?v=3","gravatar_id":"","url":"https://api.github.com/users/ashrayas","html_url":"https://github.com/ashrayas","followers_url":"https://api.github.com/users/ashrayas/followers","following_url":"https://api.github.com/users/ashrayas/following{/other_user}","gists_url":"https://api.github.com/users/ashrayas/gists{/gist_id}","starred_url":"https://api.github.com/users/ashrayas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashrayas/subscriptions","organizations_url":"https://api.github.com/users/ashrayas/orgs","repos_url":"https://api.github.com/users/ashrayas/repos","events_url":"https://api.github.com/users/ashrayas/events{/privacy}","received_events_url":"https://api.github.com/users/ashrayas/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-15T19:35:37Z","updated_at":"2016-02-15T23:01:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86a6c545762a1fa15456eb748c2329741d55533f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1/commits","review_comments_url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1/comments","review_comment_url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HOOQsters/hello-csv/issues/1/comments","statuses_url":"https://api.github.com/repos/HOOQsters/hello-csv/statuses/fee3a57c8ac5993d0f3028cb3869393dd3ea43da","head":{"label":"ashrayas:martin_version","ref":"martin_version","sha":"fee3a57c8ac5993d0f3028cb3869393dd3ea43da","user":{"login":"ashrayas","id":11660544,"avatar_url":"https://avatars.githubusercontent.com/u/11660544?v=3","gravatar_id":"","url":"https://api.github.com/users/ashrayas","html_url":"https://github.com/ashrayas","followers_url":"https://api.github.com/users/ashrayas/followers","following_url":"https://api.github.com/users/ashrayas/following{/other_user}","gists_url":"https://api.github.com/users/ashrayas/gists{/gist_id}","starred_url":"https://api.github.com/users/ashrayas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashrayas/subscriptions","organizations_url":"https://api.github.com/users/ashrayas/orgs","repos_url":"https://api.github.com/users/ashrayas/repos","events_url":"https://api.github.com/users/ashrayas/events{/privacy}","received_events_url":"https://api.github.com/users/ashrayas/received_events","type":"User","site_admin":false},"repo":{"id":51680043,"name":"hello-csv","full_name":"ashrayas/hello-csv","owner":{"login":"ashrayas","id":11660544,"avatar_url":"https://avatars.githubusercontent.com/u/11660544?v=3","gravatar_id":"","url":"https://api.github.com/users/ashrayas","html_url":"https://github.com/ashrayas","followers_url":"https://api.github.com/users/ashrayas/followers","following_url":"https://api.github.com/users/ashrayas/following{/other_user}","gists_url":"https://api.github.com/users/ashrayas/gists{/gist_id}","starred_url":"https://api.github.com/users/ashrayas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashrayas/subscriptions","organizations_url":"https://api.github.com/users/ashrayas/orgs","repos_url":"https://api.github.com/users/ashrayas/repos","events_url":"https://api.github.com/users/ashrayas/events{/privacy}","received_events_url":"https://api.github.com/users/ashrayas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ashrayas/hello-csv","description":"Hello CSV!","fork":true,"url":"https://api.github.com/repos/ashrayas/hello-csv","forks_url":"https://api.github.com/repos/ashrayas/hello-csv/forks","keys_url":"https://api.github.com/repos/ashrayas/hello-csv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ashrayas/hello-csv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ashrayas/hello-csv/teams","hooks_url":"https://api.github.com/repos/ashrayas/hello-csv/hooks","issue_events_url":"https://api.github.com/repos/ashrayas/hello-csv/issues/events{/number}","events_url":"https://api.github.com/repos/ashrayas/hello-csv/events","assignees_url":"https://api.github.com/repos/ashrayas/hello-csv/assignees{/user}","branches_url":"https://api.github.com/repos/ashrayas/hello-csv/branches{/branch}","tags_url":"https://api.github.com/repos/ashrayas/hello-csv/tags","blobs_url":"https://api.github.com/repos/ashrayas/hello-csv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ashrayas/hello-csv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ashrayas/hello-csv/git/refs{/sha}","trees_url":"https://api.github.com/repos/ashrayas/hello-csv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ashrayas/hello-csv/statuses/{sha}","languages_url":"https://api.github.com/repos/ashrayas/hello-csv/languages","stargazers_url":"https://api.github.com/repos/ashrayas/hello-csv/stargazers","contributors_url":"https://api.github.com/repos/ashrayas/hello-csv/contributors","subscribers_url":"https://api.github.com/repos/ashrayas/hello-csv/subscribers","subscription_url":"https://api.github.com/repos/ashrayas/hello-csv/subscription","commits_url":"https://api.github.com/repos/ashrayas/hello-csv/commits{/sha}","git_commits_url":"https://api.github.com/repos/ashrayas/hello-csv/git/commits{/sha}","comments_url":"https://api.github.com/repos/ashrayas/hello-csv/comments{/number}","issue_comment_url":"https://api.github.com/repos/ashrayas/hello-csv/issues/comments{/number}","contents_url":"https://api.github.com/repos/ashrayas/hello-csv/contents/{+path}","compare_url":"https://api.github.com/repos/ashrayas/hello-csv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ashrayas/hello-csv/merges","archive_url":"https://api.github.com/repos/ashrayas/hello-csv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ashrayas/hello-csv/downloads","issues_url":"https://api.github.com/repos/ashrayas/hello-csv/issues{/number}","pulls_url":"https://api.github.com/repos/ashrayas/hello-csv/pulls{/number}","milestones_url":"https://api.github.com/repos/ashrayas/hello-csv/milestones{/number}","notifications_url":"https://api.github.com/repos/ashrayas/hello-csv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ashrayas/hello-csv/labels{/name}","releases_url":"https://api.github.com/repos/ashrayas/hello-csv/releases{/id}","deployments_url":"https://api.github.com/repos/ashrayas/hello-csv/deployments","created_at":"2016-02-14T04:47:07Z","updated_at":"2016-02-14T04:47:08Z","pushed_at":"2016-02-15T19:33:34Z","git_url":"git://github.com/ashrayas/hello-csv.git","ssh_url":"git@github.com:ashrayas/hello-csv.git","clone_url":"https://github.com/ashrayas/hello-csv.git","svn_url":"https://github.com/ashrayas/hello-csv","homepage":null,"size":47,"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":"HOOQsters:master","ref":"master","sha":"a259f3f1b027a534b377fde6b4feaf21d7a15a7c","user":{"login":"HOOQsters","id":17188584,"avatar_url":"https://avatars.githubusercontent.com/u/17188584?v=3","gravatar_id":"","url":"https://api.github.com/users/HOOQsters","html_url":"https://github.com/HOOQsters","followers_url":"https://api.github.com/users/HOOQsters/followers","following_url":"https://api.github.com/users/HOOQsters/following{/other_user}","gists_url":"https://api.github.com/users/HOOQsters/gists{/gist_id}","starred_url":"https://api.github.com/users/HOOQsters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HOOQsters/subscriptions","organizations_url":"https://api.github.com/users/HOOQsters/orgs","repos_url":"https://api.github.com/users/HOOQsters/repos","events_url":"https://api.github.com/users/HOOQsters/events{/privacy}","received_events_url":"https://api.github.com/users/HOOQsters/received_events","type":"Organization","site_admin":false},"repo":{"id":51561134,"name":"hello-csv","full_name":"HOOQsters/hello-csv","owner":{"login":"HOOQsters","id":17188584,"avatar_url":"https://avatars.githubusercontent.com/u/17188584?v=3","gravatar_id":"","url":"https://api.github.com/users/HOOQsters","html_url":"https://github.com/HOOQsters","followers_url":"https://api.github.com/users/HOOQsters/followers","following_url":"https://api.github.com/users/HOOQsters/following{/other_user}","gists_url":"https://api.github.com/users/HOOQsters/gists{/gist_id}","starred_url":"https://api.github.com/users/HOOQsters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HOOQsters/subscriptions","organizations_url":"https://api.github.com/users/HOOQsters/orgs","repos_url":"https://api.github.com/users/HOOQsters/repos","events_url":"https://api.github.com/users/HOOQsters/events{/privacy}","received_events_url":"https://api.github.com/users/HOOQsters/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HOOQsters/hello-csv","description":"Hello CSV!","fork":false,"url":"https://api.github.com/repos/HOOQsters/hello-csv","forks_url":"https://api.github.com/repos/HOOQsters/hello-csv/forks","keys_url":"https://api.github.com/repos/HOOQsters/hello-csv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HOOQsters/hello-csv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HOOQsters/hello-csv/teams","hooks_url":"https://api.github.com/repos/HOOQsters/hello-csv/hooks","issue_events_url":"https://api.github.com/repos/HOOQsters/hello-csv/issues/events{/number}","events_url":"https://api.github.com/repos/HOOQsters/hello-csv/events","assignees_url":"https://api.github.com/repos/HOOQsters/hello-csv/assignees{/user}","branches_url":"https://api.github.com/repos/HOOQsters/hello-csv/branches{/branch}","tags_url":"https://api.github.com/repos/HOOQsters/hello-csv/tags","blobs_url":"https://api.github.com/repos/HOOQsters/hello-csv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HOOQsters/hello-csv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HOOQsters/hello-csv/git/refs{/sha}","trees_url":"https://api.github.com/repos/HOOQsters/hello-csv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HOOQsters/hello-csv/statuses/{sha}","languages_url":"https://api.github.com/repos/HOOQsters/hello-csv/languages","stargazers_url":"https://api.github.com/repos/HOOQsters/hello-csv/stargazers","contributors_url":"https://api.github.com/repos/HOOQsters/hello-csv/contributors","subscribers_url":"https://api.github.com/repos/HOOQsters/hello-csv/subscribers","subscription_url":"https://api.github.com/repos/HOOQsters/hello-csv/subscription","commits_url":"https://api.github.com/repos/HOOQsters/hello-csv/commits{/sha}","git_commits_url":"https://api.github.com/repos/HOOQsters/hello-csv/git/commits{/sha}","comments_url":"https://api.github.com/repos/HOOQsters/hello-csv/comments{/number}","issue_comment_url":"https://api.github.com/repos/HOOQsters/hello-csv/issues/comments{/number}","contents_url":"https://api.github.com/repos/HOOQsters/hello-csv/contents/{+path}","compare_url":"https://api.github.com/repos/HOOQsters/hello-csv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HOOQsters/hello-csv/merges","archive_url":"https://api.github.com/repos/HOOQsters/hello-csv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HOOQsters/hello-csv/downloads","issues_url":"https://api.github.com/repos/HOOQsters/hello-csv/issues{/number}","pulls_url":"https://api.github.com/repos/HOOQsters/hello-csv/pulls{/number}","milestones_url":"https://api.github.com/repos/HOOQsters/hello-csv/milestones{/number}","notifications_url":"https://api.github.com/repos/HOOQsters/hello-csv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HOOQsters/hello-csv/labels{/name}","releases_url":"https://api.github.com/repos/HOOQsters/hello-csv/releases{/id}","deployments_url":"https://api.github.com/repos/HOOQsters/hello-csv/deployments","created_at":"2016-02-12T01:44:21Z","updated_at":"2016-02-12T01:44:43Z","pushed_at":"2016-02-15T19:35:37Z","git_url":"git://github.com/HOOQsters/hello-csv.git","ssh_url":"git@github.com:HOOQsters/hello-csv.git","clone_url":"https://github.com/HOOQsters/hello-csv.git","svn_url":"https://github.com/HOOQsters/hello-csv","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1"},"html":{"href":"https://github.com/HOOQsters/hello-csv/pull/1"},"issue":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/issues/1"},"comments":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/HOOQsters/hello-csv/statuses/fee3a57c8ac5993d0f3028cb3869393dd3ea43da"}}}}