GitHub PullRequestReviewCommentEvent at 2014-10-13 08:37:07
Repository: techblog
Actor: NikhilVerma
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/badoo/techblog/pulls/comments/18758231","id":18758231,"diff_hunk":"@@ -0,0 +1,196 @@\n+---\n+layout: post\n+title:  Using regular expressions to hack our way towards AMDfication\n+author: Nikhil Verma\n+date:   2014-10-09\n+categories: javascript regex\n+---\n+\n+Badoo MobileWeb project started in early 2012. Due to the initial pace of development, coding conventions and modularisation weren’t given priority. Most of the “modules” lived inside a global object. As the project grew it became difficult to maintain. Bugs became harder to track down. After much internal discussion we found an opportunity to convert our codebase to use AMD modules [RequireJS](http://requirejs.org/docs/whyamd.html). I’m here to tell you how we used the power of regular expressions to speed up our migration process.\n+\n+# The Problem\n+\n+Let me share with you a snippet of the kind of code we were working with.\n+\n+{% highlight javascript %}","path":"_posts/2014-10-09-using-regular-expressions-to-hack-our-way-towards-amdfication.md","position":15,"original_position":15,"commit_id":"d9d0ca6d369d0b7eeb76a3e8482608e763fcb185","original_commit_id":"d9d0ca6d369d0b7eeb76a3e8482608e763fcb185","user":{"login":"NikhilVerma","id":87832,"avatar_url":"https://avatars.githubusercontent.com/u/87832?v=2","gravatar_id":"","url":"https://api.github.com/users/NikhilVerma","html_url":"https://github.com/NikhilVerma","followers_url":"https://api.github.com/users/NikhilVerma/followers","following_url":"https://api.github.com/users/NikhilVerma/following{/other_user}","gists_url":"https://api.github.com/users/NikhilVerma/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilVerma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilVerma/subscriptions","organizations_url":"https://api.github.com/users/NikhilVerma/orgs","repos_url":"https://api.github.com/users/NikhilVerma/repos","events_url":"https://api.github.com/users/NikhilVerma/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilVerma/received_events","type":"User","site_admin":false},"body":"Yeah it's better to render the post itself and have a look (Because it's not the same markdown style used by git)","created_at":"2014-10-13T08:37:07Z","updated_at":"2014-10-13T08:37:07Z","html_url":"https://github.com/badoo/techblog/pull/34#discussion_r18758231","pull_request_url":"https://api.github.com/repos/badoo/techblog/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/badoo/techblog/pulls/comments/18758231"},"html":{"href":"https://github.com/badoo/techblog/pull/34#discussion_r18758231"},"pull_request":{"href":"https://api.github.com/repos/badoo/techblog/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/badoo/techblog/pulls/34","id":22440639,"html_url":"https://github.com/badoo/techblog/pull/34","diff_url":"https://github.com/badoo/techblog/pull/34.diff","patch_url":"https://github.com/badoo/techblog/pull/34.patch","issue_url":"https://api.github.com/repos/badoo/techblog/issues/34","number":34,"state":"open","locked":false,"title":"Using regular expressions to hack our way towards AMDfication","user":{"login":"NikhilVerma","id":87832,"avatar_url":"https://avatars.githubusercontent.com/u/87832?v=2","gravatar_id":"","url":"https://api.github.com/users/NikhilVerma","html_url":"https://github.com/NikhilVerma","followers_url":"https://api.github.com/users/NikhilVerma/followers","following_url":"https://api.github.com/users/NikhilVerma/following{/other_user}","gists_url":"https://api.github.com/users/NikhilVerma/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilVerma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilVerma/subscriptions","organizations_url":"https://api.github.com/users/NikhilVerma/orgs","repos_url":"https://api.github.com/users/NikhilVerma/repos","events_url":"https://api.github.com/users/NikhilVerma/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilVerma/received_events","type":"User","site_admin":false},"body":"And tweaks to our code styles","created_at":"2014-10-08T17:44:18Z","updated_at":"2014-10-13T08:37:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efcebf8ffa03676e06885a5c0502fce606d8fd3b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/badoo/techblog/pulls/34/commits","review_comments_url":"https://api.github.com/repos/badoo/techblog/pulls/34/comments","review_comment_url":"https://api.github.com/repos/badoo/techblog/pulls/comments/{number}","comments_url":"https://api.github.com/repos/badoo/techblog/issues/34/comments","statuses_url":"https://api.github.com/repos/badoo/techblog/statuses/d9d0ca6d369d0b7eeb76a3e8482608e763fcb185","head":{"label":"NikhilVerma:regex-require","ref":"regex-require","sha":"d9d0ca6d369d0b7eeb76a3e8482608e763fcb185","user":{"login":"NikhilVerma","id":87832,"avatar_url":"https://avatars.githubusercontent.com/u/87832?v=2","gravatar_id":"","url":"https://api.github.com/users/NikhilVerma","html_url":"https://github.com/NikhilVerma","followers_url":"https://api.github.com/users/NikhilVerma/followers","following_url":"https://api.github.com/users/NikhilVerma/following{/other_user}","gists_url":"https://api.github.com/users/NikhilVerma/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilVerma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilVerma/subscriptions","organizations_url":"https://api.github.com/users/NikhilVerma/orgs","repos_url":"https://api.github.com/users/NikhilVerma/repos","events_url":"https://api.github.com/users/NikhilVerma/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilVerma/received_events","type":"User","site_admin":false},"repo":{"id":13380603,"name":"techblog","full_name":"NikhilVerma/techblog","owner":{"login":"NikhilVerma","id":87832,"avatar_url":"https://avatars.githubusercontent.com/u/87832?v=2","gravatar_id":"","url":"https://api.github.com/users/NikhilVerma","html_url":"https://github.com/NikhilVerma","followers_url":"https://api.github.com/users/NikhilVerma/followers","following_url":"https://api.github.com/users/NikhilVerma/following{/other_user}","gists_url":"https://api.github.com/users/NikhilVerma/gists{/gist_id}","starred_url":"https://api.github.com/users/NikhilVerma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikhilVerma/subscriptions","organizations_url":"https://api.github.com/users/NikhilVerma/orgs","repos_url":"https://api.github.com/users/NikhilVerma/repos","events_url":"https://api.github.com/users/NikhilVerma/events{/privacy}","received_events_url":"https://api.github.com/users/NikhilVerma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NikhilVerma/techblog","description":"","fork":true,"url":"https://api.github.com/repos/NikhilVerma/techblog","forks_url":"https://api.github.com/repos/NikhilVerma/techblog/forks","keys_url":"https://api.github.com/repos/NikhilVerma/techblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NikhilVerma/techblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NikhilVerma/techblog/teams","hooks_url":"https://api.github.com/repos/NikhilVerma/techblog/hooks","issue_events_url":"https://api.github.com/repos/NikhilVerma/techblog/issues/events{/number}","events_url":"https://api.github.com/repos/NikhilVerma/techblog/events","assignees_url":"https://api.github.com/repos/NikhilVerma/techblog/assignees{/user}","branches_url":"https://api.github.com/repos/NikhilVerma/techblog/branches{/branch}","tags_url":"https://api.github.com/repos/NikhilVerma/techblog/tags","blobs_url":"https://api.github.com/repos/NikhilVerma/techblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NikhilVerma/techblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NikhilVerma/techblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/NikhilVerma/techblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NikhilVerma/techblog/statuses/{sha}","languages_url":"https://api.github.com/repos/NikhilVerma/techblog/languages","stargazers_url":"https://api.github.com/repos/NikhilVerma/techblog/stargazers","contributors_url":"https://api.github.com/repos/NikhilVerma/techblog/contributors","subscribers_url":"https://api.github.com/repos/NikhilVerma/techblog/subscribers","subscription_url":"https://api.github.com/repos/NikhilVerma/techblog/subscription","commits_url":"https://api.github.com/repos/NikhilVerma/techblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/NikhilVerma/techblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/NikhilVerma/techblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/NikhilVerma/techblog/issues/comments/{number}","contents_url":"https://api.github.com/repos/NikhilVerma/techblog/contents/{+path}","compare_url":"https://api.github.com/repos/NikhilVerma/techblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NikhilVerma/techblog/merges","archive_url":"https://api.github.com/repos/NikhilVerma/techblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NikhilVerma/techblog/downloads","issues_url":"https://api.github.com/repos/NikhilVerma/techblog/issues{/number}","pulls_url":"https://api.github.com/repos/NikhilVerma/techblog/pulls{/number}","milestones_url":"https://api.github.com/repos/NikhilVerma/techblog/milestones{/number}","notifications_url":"https://api.github.com/repos/NikhilVerma/techblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NikhilVerma/techblog/labels{/name}","releases_url":"https://api.github.com/repos/NikhilVerma/techblog/releases{/id}","created_at":"2013-10-07T10:12:20Z","updated_at":"2014-01-21T11:06:53Z","pushed_at":"2014-10-09T14:36:28Z","git_url":"git://github.com/NikhilVerma/techblog.git","ssh_url":"git@github.com:NikhilVerma/techblog.git","clone_url":"https://github.com/NikhilVerma/techblog.git","svn_url":"https://github.com/NikhilVerma/techblog","homepage":null,"size":13162,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"badoo:master","ref":"master","sha":"f4e8e18376d76853385a0ff783d81106873a9d98","user":{"login":"badoo","id":1277442,"avatar_url":"https://avatars.githubusercontent.com/u/1277442?v=2","gravatar_id":"","url":"https://api.github.com/users/badoo","html_url":"https://github.com/badoo","followers_url":"https://api.github.com/users/badoo/followers","following_url":"https://api.github.com/users/badoo/following{/other_user}","gists_url":"https://api.github.com/users/badoo/gists{/gist_id}","starred_url":"https://api.github.com/users/badoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badoo/subscriptions","organizations_url":"https://api.github.com/users/badoo/orgs","repos_url":"https://api.github.com/users/badoo/repos","events_url":"https://api.github.com/users/badoo/events{/privacy}","received_events_url":"https://api.github.com/users/badoo/received_events","type":"Organization","site_admin":false},"repo":{"id":12782896,"name":"techblog","full_name":"badoo/techblog","owner":{"login":"badoo","id":1277442,"avatar_url":"https://avatars.githubusercontent.com/u/1277442?v=2","gravatar_id":"","url":"https://api.github.com/users/badoo","html_url":"https://github.com/badoo","followers_url":"https://api.github.com/users/badoo/followers","following_url":"https://api.github.com/users/badoo/following{/other_user}","gists_url":"https://api.github.com/users/badoo/gists{/gist_id}","starred_url":"https://api.github.com/users/badoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badoo/subscriptions","organizations_url":"https://api.github.com/users/badoo/orgs","repos_url":"https://api.github.com/users/badoo/repos","events_url":"https://api.github.com/users/badoo/events{/privacy}","received_events_url":"https://api.github.com/users/badoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/badoo/techblog","description":"","fork":false,"url":"https://api.github.com/repos/badoo/techblog","forks_url":"https://api.github.com/repos/badoo/techblog/forks","keys_url":"https://api.github.com/repos/badoo/techblog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/badoo/techblog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/badoo/techblog/teams","hooks_url":"https://api.github.com/repos/badoo/techblog/hooks","issue_events_url":"https://api.github.com/repos/badoo/techblog/issues/events{/number}","events_url":"https://api.github.com/repos/badoo/techblog/events","assignees_url":"https://api.github.com/repos/badoo/techblog/assignees{/user}","branches_url":"https://api.github.com/repos/badoo/techblog/branches{/branch}","tags_url":"https://api.github.com/repos/badoo/techblog/tags","blobs_url":"https://api.github.com/repos/badoo/techblog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/badoo/techblog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/badoo/techblog/git/refs{/sha}","trees_url":"https://api.github.com/repos/badoo/techblog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/badoo/techblog/statuses/{sha}","languages_url":"https://api.github.com/repos/badoo/techblog/languages","stargazers_url":"https://api.github.com/repos/badoo/techblog/stargazers","contributors_url":"https://api.github.com/repos/badoo/techblog/contributors","subscribers_url":"https://api.github.com/repos/badoo/techblog/subscribers","subscription_url":"https://api.github.com/repos/badoo/techblog/subscription","commits_url":"https://api.github.com/repos/badoo/techblog/commits{/sha}","git_commits_url":"https://api.github.com/repos/badoo/techblog/git/commits{/sha}","comments_url":"https://api.github.com/repos/badoo/techblog/comments{/number}","issue_comment_url":"https://api.github.com/repos/badoo/techblog/issues/comments/{number}","contents_url":"https://api.github.com/repos/badoo/techblog/contents/{+path}","compare_url":"https://api.github.com/repos/badoo/techblog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/badoo/techblog/merges","archive_url":"https://api.github.com/repos/badoo/techblog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/badoo/techblog/downloads","issues_url":"https://api.github.com/repos/badoo/techblog/issues{/number}","pulls_url":"https://api.github.com/repos/badoo/techblog/pulls{/number}","milestones_url":"https://api.github.com/repos/badoo/techblog/milestones{/number}","notifications_url":"https://api.github.com/repos/badoo/techblog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/badoo/techblog/labels{/name}","releases_url":"https://api.github.com/repos/badoo/techblog/releases{/id}","created_at":"2013-09-12T12:24:57Z","updated_at":"2014-09-04T13:30:23Z","pushed_at":"2014-10-09T13:42:18Z","git_url":"git://github.com/badoo/techblog.git","ssh_url":"git@github.com:badoo/techblog.git","clone_url":"https://github.com/badoo/techblog.git","svn_url":"https://github.com/badoo/techblog","homepage":null,"size":13831,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/badoo/techblog/pulls/34"},"html":{"href":"https://github.com/badoo/techblog/pull/34"},"issue":{"href":"https://api.github.com/repos/badoo/techblog/issues/34"},"comments":{"href":"https://api.github.com/repos/badoo/techblog/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/badoo/techblog/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/badoo/techblog/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/badoo/techblog/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/badoo/techblog/statuses/d9d0ca6d369d0b7eeb76a3e8482608e763fcb185"}}}}