{"action":"created","comment":{"url":"https://api.github.com/repos/itkpi/events-parser/pulls/comments/73624660","id":73624660,"diff_hunk":"@@ -0,0 +1,44 @@\n+/**\n+ * Utils functions.\n+ */\n+\n+'use strict'\n+\n+const fs = require('fs-extra')\n+const moment = require('moment')\n+const cronLog = require('console').Console\n+\n+/**\n+ * Custom logging tool. Save logs to file and print them to console (for cron logs)\n+ */\n+exports._log_ = (log, name) => {\n+  const d = new Date()\n+\n+  if (!name) {\n+    name = d.getMonth() + 1\n+    if (name < 10) name = `0${name}`\n+  }\n+\n+  fs.appendFile(`./logs/${d.getFullYear()}_${name}`, `${d}: ${log}\\n`, (err) => {\n+    if (err) throw err\n+  })\n+\n+  cronLog(log)\n+}\n+\n+/**\n+ * Determination of language of the event by title of the month.\n+ */\n+exports.locale = (mm) => {\n+  moment.locale('ru')\n+  if (!isNaN(moment(mm, 'MMMM').get('month'))) {","path":"utils.js","position":34,"original_position":34,"commit_id":"9f51b67b9cc30f1e597214b5ad6f415dc137ce6f","original_commit_id":"9f51b67b9cc30f1e597214b5ad6f415dc137ce6f","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Strings must use doublequote. (quotes)](https://www.codacy.com/app/webknjaz-Organization/events-parser/file/3168153733/issues/source?bid=3283923&fileBranchId=3495482#l34)","created_at":"2016-08-05T00:13:06Z","updated_at":"2016-08-05T00:13:06Z","html_url":"https://github.com/itkpi/events-parser/pull/21#discussion_r73624660","pull_request_url":"https://api.github.com/repos/itkpi/events-parser/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/comments/73624660"},"html":{"href":"https://github.com/itkpi/events-parser/pull/21#discussion_r73624660"},"pull_request":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/itkpi/events-parser/pulls/21","id":79788752,"html_url":"https://github.com/itkpi/events-parser/pull/21","diff_url":"https://github.com/itkpi/events-parser/pull/21.diff","patch_url":"https://github.com/itkpi/events-parser/pull/21.patch","issue_url":"https://api.github.com/repos/itkpi/events-parser/issues/21","number":21,"state":"open","locked":false,"title":"Refactoring:","user":{"login":"MaxymVlasov","id":11096782,"avatar_url":"https://avatars.githubusercontent.com/u/11096782?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxymVlasov","html_url":"https://github.com/MaxymVlasov","followers_url":"https://api.github.com/users/MaxymVlasov/followers","following_url":"https://api.github.com/users/MaxymVlasov/following{/other_user}","gists_url":"https://api.github.com/users/MaxymVlasov/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxymVlasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxymVlasov/subscriptions","organizations_url":"https://api.github.com/users/MaxymVlasov/orgs","repos_url":"https://api.github.com/users/MaxymVlasov/repos","events_url":"https://api.github.com/users/MaxymVlasov/events{/privacy}","received_events_url":"https://api.github.com/users/MaxymVlasov/received_events","type":"User","site_admin":false},"body":"* Rename files\r\n* Rename functions\r\n* Change structure of project\r\n* Add comments\r\n* Reduce max symbols of post to 7000","created_at":"2016-08-02T18:54:01Z","updated_at":"2016-08-05T00:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3faf48abd0036e48339286a0324736c8609e8aae","assignee":{"login":"webknjaz","id":578543,"avatar_url":"https://avatars.githubusercontent.com/u/578543?v=3","gravatar_id":"","url":"https://api.github.com/users/webknjaz","html_url":"https://github.com/webknjaz","followers_url":"https://api.github.com/users/webknjaz/followers","following_url":"https://api.github.com/users/webknjaz/following{/other_user}","gists_url":"https://api.github.com/users/webknjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webknjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webknjaz/subscriptions","organizations_url":"https://api.github.com/users/webknjaz/orgs","repos_url":"https://api.github.com/users/webknjaz/repos","events_url":"https://api.github.com/users/webknjaz/events{/privacy}","received_events_url":"https://api.github.com/users/webknjaz/received_events","type":"User","site_admin":false},"assignees":[{"login":"webknjaz","id":578543,"avatar_url":"https://avatars.githubusercontent.com/u/578543?v=3","gravatar_id":"","url":"https://api.github.com/users/webknjaz","html_url":"https://github.com/webknjaz","followers_url":"https://api.github.com/users/webknjaz/followers","following_url":"https://api.github.com/users/webknjaz/following{/other_user}","gists_url":"https://api.github.com/users/webknjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webknjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webknjaz/subscriptions","organizations_url":"https://api.github.com/users/webknjaz/orgs","repos_url":"https://api.github.com/users/webknjaz/repos","events_url":"https://api.github.com/users/webknjaz/events{/privacy}","received_events_url":"https://api.github.com/users/webknjaz/received_events","type":"User","site_admin":false},{"login":"maksim36ua","id":10496082,"avatar_url":"https://avatars.githubusercontent.com/u/10496082?v=3","gravatar_id":"","url":"https://api.github.com/users/maksim36ua","html_url":"https://github.com/maksim36ua","followers_url":"https://api.github.com/users/maksim36ua/followers","following_url":"https://api.github.com/users/maksim36ua/following{/other_user}","gists_url":"https://api.github.com/users/maksim36ua/gists{/gist_id}","starred_url":"https://api.github.com/users/maksim36ua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maksim36ua/subscriptions","organizations_url":"https://api.github.com/users/maksim36ua/orgs","repos_url":"https://api.github.com/users/maksim36ua/repos","events_url":"https://api.github.com/users/maksim36ua/events{/privacy}","received_events_url":"https://api.github.com/users/maksim36ua/received_events","type":"User","site_admin":false},{"login":"MaxymVlasov","id":11096782,"avatar_url":"https://avatars.githubusercontent.com/u/11096782?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxymVlasov","html_url":"https://github.com/MaxymVlasov","followers_url":"https://api.github.com/users/MaxymVlasov/followers","following_url":"https://api.github.com/users/MaxymVlasov/following{/other_user}","gists_url":"https://api.github.com/users/MaxymVlasov/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxymVlasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxymVlasov/subscriptions","organizations_url":"https://api.github.com/users/MaxymVlasov/orgs","repos_url":"https://api.github.com/users/MaxymVlasov/repos","events_url":"https://api.github.com/users/MaxymVlasov/events{/privacy}","received_events_url":"https://api.github.com/users/MaxymVlasov/received_events","type":"User","site_admin":false},{"login":"wack17s","id":14200710,"avatar_url":"https://avatars.githubusercontent.com/u/14200710?v=3","gravatar_id":"","url":"https://api.github.com/users/wack17s","html_url":"https://github.com/wack17s","followers_url":"https://api.github.com/users/wack17s/followers","following_url":"https://api.github.com/users/wack17s/following{/other_user}","gists_url":"https://api.github.com/users/wack17s/gists{/gist_id}","starred_url":"https://api.github.com/users/wack17s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wack17s/subscriptions","organizations_url":"https://api.github.com/users/wack17s/orgs","repos_url":"https://api.github.com/users/wack17s/repos","events_url":"https://api.github.com/users/wack17s/events{/privacy}","received_events_url":"https://api.github.com/users/wack17s/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/itkpi/events-parser/pulls/21/commits","review_comments_url":"https://api.github.com/repos/itkpi/events-parser/pulls/21/comments","review_comment_url":"https://api.github.com/repos/itkpi/events-parser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itkpi/events-parser/issues/21/comments","statuses_url":"https://api.github.com/repos/itkpi/events-parser/statuses/9f51b67b9cc30f1e597214b5ad6f415dc137ce6f","head":{"label":"itkpi:refactoring","ref":"refactoring","sha":"9f51b67b9cc30f1e597214b5ad6f415dc137ce6f","user":{"login":"itkpi","id":12073380,"avatar_url":"https://avatars.githubusercontent.com/u/12073380?v=3","gravatar_id":"","url":"https://api.github.com/users/itkpi","html_url":"https://github.com/itkpi","followers_url":"https://api.github.com/users/itkpi/followers","following_url":"https://api.github.com/users/itkpi/following{/other_user}","gists_url":"https://api.github.com/users/itkpi/gists{/gist_id}","starred_url":"https://api.github.com/users/itkpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itkpi/subscriptions","organizations_url":"https://api.github.com/users/itkpi/orgs","repos_url":"https://api.github.com/users/itkpi/repos","events_url":"https://api.github.com/users/itkpi/events{/privacy}","received_events_url":"https://api.github.com/users/itkpi/received_events","type":"Organization","site_admin":false},"repo":{"id":51226809,"name":"events-parser","full_name":"itkpi/events-parser","owner":{"login":"itkpi","id":12073380,"avatar_url":"https://avatars.githubusercontent.com/u/12073380?v=3","gravatar_id":"","url":"https://api.github.com/users/itkpi","html_url":"https://github.com/itkpi","followers_url":"https://api.github.com/users/itkpi/followers","following_url":"https://api.github.com/users/itkpi/following{/other_user}","gists_url":"https://api.github.com/users/itkpi/gists{/gist_id}","starred_url":"https://api.github.com/users/itkpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itkpi/subscriptions","organizations_url":"https://api.github.com/users/itkpi/orgs","repos_url":"https://api.github.com/users/itkpi/repos","events_url":"https://api.github.com/users/itkpi/events{/privacy}","received_events_url":"https://api.github.com/users/itkpi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itkpi/events-parser","description":"","fork":false,"url":"https://api.github.com/repos/itkpi/events-parser","forks_url":"https://api.github.com/repos/itkpi/events-parser/forks","keys_url":"https://api.github.com/repos/itkpi/events-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itkpi/events-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itkpi/events-parser/teams","hooks_url":"https://api.github.com/repos/itkpi/events-parser/hooks","issue_events_url":"https://api.github.com/repos/itkpi/events-parser/issues/events{/number}","events_url":"https://api.github.com/repos/itkpi/events-parser/events","assignees_url":"https://api.github.com/repos/itkpi/events-parser/assignees{/user}","branches_url":"https://api.github.com/repos/itkpi/events-parser/branches{/branch}","tags_url":"https://api.github.com/repos/itkpi/events-parser/tags","blobs_url":"https://api.github.com/repos/itkpi/events-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itkpi/events-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itkpi/events-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/itkpi/events-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itkpi/events-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/itkpi/events-parser/languages","stargazers_url":"https://api.github.com/repos/itkpi/events-parser/stargazers","contributors_url":"https://api.github.com/repos/itkpi/events-parser/contributors","subscribers_url":"https://api.github.com/repos/itkpi/events-parser/subscribers","subscription_url":"https://api.github.com/repos/itkpi/events-parser/subscription","commits_url":"https://api.github.com/repos/itkpi/events-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/itkpi/events-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/itkpi/events-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/itkpi/events-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/itkpi/events-parser/contents/{+path}","compare_url":"https://api.github.com/repos/itkpi/events-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itkpi/events-parser/merges","archive_url":"https://api.github.com/repos/itkpi/events-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itkpi/events-parser/downloads","issues_url":"https://api.github.com/repos/itkpi/events-parser/issues{/number}","pulls_url":"https://api.github.com/repos/itkpi/events-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/itkpi/events-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/itkpi/events-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itkpi/events-parser/labels{/name}","releases_url":"https://api.github.com/repos/itkpi/events-parser/releases{/id}","deployments_url":"https://api.github.com/repos/itkpi/events-parser/deployments","created_at":"2016-02-06T23:15:43Z","updated_at":"2016-02-17T16:09:24Z","pushed_at":"2016-08-05T00:10:56Z","git_url":"git://github.com/itkpi/events-parser.git","ssh_url":"git@github.com:itkpi/events-parser.git","clone_url":"https://github.com/itkpi/events-parser.git","svn_url":"https://github.com/itkpi/events-parser","homepage":"http://itkpi.pp.ua/events/","size":88,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"itkpi:master","ref":"master","sha":"0887e6a1eaa1c92f4e0ef6ee00ccf3add9eafffe","user":{"login":"itkpi","id":12073380,"avatar_url":"https://avatars.githubusercontent.com/u/12073380?v=3","gravatar_id":"","url":"https://api.github.com/users/itkpi","html_url":"https://github.com/itkpi","followers_url":"https://api.github.com/users/itkpi/followers","following_url":"https://api.github.com/users/itkpi/following{/other_user}","gists_url":"https://api.github.com/users/itkpi/gists{/gist_id}","starred_url":"https://api.github.com/users/itkpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itkpi/subscriptions","organizations_url":"https://api.github.com/users/itkpi/orgs","repos_url":"https://api.github.com/users/itkpi/repos","events_url":"https://api.github.com/users/itkpi/events{/privacy}","received_events_url":"https://api.github.com/users/itkpi/received_events","type":"Organization","site_admin":false},"repo":{"id":51226809,"name":"events-parser","full_name":"itkpi/events-parser","owner":{"login":"itkpi","id":12073380,"avatar_url":"https://avatars.githubusercontent.com/u/12073380?v=3","gravatar_id":"","url":"https://api.github.com/users/itkpi","html_url":"https://github.com/itkpi","followers_url":"https://api.github.com/users/itkpi/followers","following_url":"https://api.github.com/users/itkpi/following{/other_user}","gists_url":"https://api.github.com/users/itkpi/gists{/gist_id}","starred_url":"https://api.github.com/users/itkpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itkpi/subscriptions","organizations_url":"https://api.github.com/users/itkpi/orgs","repos_url":"https://api.github.com/users/itkpi/repos","events_url":"https://api.github.com/users/itkpi/events{/privacy}","received_events_url":"https://api.github.com/users/itkpi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/itkpi/events-parser","description":"","fork":false,"url":"https://api.github.com/repos/itkpi/events-parser","forks_url":"https://api.github.com/repos/itkpi/events-parser/forks","keys_url":"https://api.github.com/repos/itkpi/events-parser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itkpi/events-parser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itkpi/events-parser/teams","hooks_url":"https://api.github.com/repos/itkpi/events-parser/hooks","issue_events_url":"https://api.github.com/repos/itkpi/events-parser/issues/events{/number}","events_url":"https://api.github.com/repos/itkpi/events-parser/events","assignees_url":"https://api.github.com/repos/itkpi/events-parser/assignees{/user}","branches_url":"https://api.github.com/repos/itkpi/events-parser/branches{/branch}","tags_url":"https://api.github.com/repos/itkpi/events-parser/tags","blobs_url":"https://api.github.com/repos/itkpi/events-parser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itkpi/events-parser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itkpi/events-parser/git/refs{/sha}","trees_url":"https://api.github.com/repos/itkpi/events-parser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itkpi/events-parser/statuses/{sha}","languages_url":"https://api.github.com/repos/itkpi/events-parser/languages","stargazers_url":"https://api.github.com/repos/itkpi/events-parser/stargazers","contributors_url":"https://api.github.com/repos/itkpi/events-parser/contributors","subscribers_url":"https://api.github.com/repos/itkpi/events-parser/subscribers","subscription_url":"https://api.github.com/repos/itkpi/events-parser/subscription","commits_url":"https://api.github.com/repos/itkpi/events-parser/commits{/sha}","git_commits_url":"https://api.github.com/repos/itkpi/events-parser/git/commits{/sha}","comments_url":"https://api.github.com/repos/itkpi/events-parser/comments{/number}","issue_comment_url":"https://api.github.com/repos/itkpi/events-parser/issues/comments{/number}","contents_url":"https://api.github.com/repos/itkpi/events-parser/contents/{+path}","compare_url":"https://api.github.com/repos/itkpi/events-parser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itkpi/events-parser/merges","archive_url":"https://api.github.com/repos/itkpi/events-parser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itkpi/events-parser/downloads","issues_url":"https://api.github.com/repos/itkpi/events-parser/issues{/number}","pulls_url":"https://api.github.com/repos/itkpi/events-parser/pulls{/number}","milestones_url":"https://api.github.com/repos/itkpi/events-parser/milestones{/number}","notifications_url":"https://api.github.com/repos/itkpi/events-parser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itkpi/events-parser/labels{/name}","releases_url":"https://api.github.com/repos/itkpi/events-parser/releases{/id}","deployments_url":"https://api.github.com/repos/itkpi/events-parser/deployments","created_at":"2016-02-06T23:15:43Z","updated_at":"2016-02-17T16:09:24Z","pushed_at":"2016-08-05T00:10:56Z","git_url":"git://github.com/itkpi/events-parser.git","ssh_url":"git@github.com:itkpi/events-parser.git","clone_url":"https://github.com/itkpi/events-parser.git","svn_url":"https://github.com/itkpi/events-parser","homepage":"http://itkpi.pp.ua/events/","size":88,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/21"},"html":{"href":"https://github.com/itkpi/events-parser/pull/21"},"issue":{"href":"https://api.github.com/repos/itkpi/events-parser/issues/21"},"comments":{"href":"https://api.github.com/repos/itkpi/events-parser/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itkpi/events-parser/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/itkpi/events-parser/statuses/9f51b67b9cc30f1e597214b5ad6f415dc137ce6f"}}}}
{"actor":{"display_login":"codacy-bot"}}