{"action":"created","comment":{"url":"https://api.github.com/repos/seventag/seventag/pulls/comments/50667252","id":50667252,"diff_hunk":"@@ -0,0 +1,131 @@\n+/**\n+ * Copyright (C) 2015 Digimedia Sp. z.o.o. d/b/a Clearcode\n+ *\n+ * This program is free software: you can redistribute it and/or modify it under\n+ * the terms of the GNU Affero General Public License as published by the Free\n+ * Software Foundation, either version 3 of the License, or (at your option) any\n+ * later version.\n+ *\n+ * This program is distrubuted in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU Affero General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public License\n+ * along with this program. If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+const SNIPPET_VARIABLE_START = '{{';\n+const SNIPPET_VARIABLE_END = '}}';\n+\n+\n+class SeventagSnippetToJsConverter {\n+\n+  /**\n+   * @name SeventagSnippetToJsConverter\n+   */\n+    constructor () {\n+    }\n+\n+    /**\n+     * @param  {[string]} textLines\n+     * @param  {object} options\n+     * @return {[string]}\n+     */\n+    convert(textLines, options){\n+\n+        if (!options || !options.variables){","path":"src/admin-panel/modules/textEditor/service/SeventagSnippetToJsConverter.js","position":37,"original_position":37,"commit_id":"0c86b30d2a198e7f6a8c0ee4c271d32050b82f38","original_commit_id":"0c86b30d2a198e7f6a8c0ee4c271d32050b82f38","user":{"login":"MarcinMat","id":15210449,"avatar_url":"https://avatars.githubusercontent.com/u/15210449?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinMat","html_url":"https://github.com/MarcinMat","followers_url":"https://api.github.com/users/MarcinMat/followers","following_url":"https://api.github.com/users/MarcinMat/following{/other_user}","gists_url":"https://api.github.com/users/MarcinMat/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinMat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinMat/subscriptions","organizations_url":"https://api.github.com/users/MarcinMat/orgs","repos_url":"https://api.github.com/users/MarcinMat/repos","events_url":"https://api.github.com/users/MarcinMat/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinMat/received_events","type":"User","site_admin":false},"body":"I do not think this is necessary. ATM it reads:\r\n*If I do not have options or provided options object does not have variables property, then nothing to do here.*\r\n\r\nMoreover, this is idiomatic js, adding another layer of braces does not improve readability. This could be extracted to separate method, but -since this is a precondition- I'm not sure such simple code would benefit from this.","created_at":"2016-01-25T08:57:38Z","updated_at":"2016-01-25T08:57:38Z","html_url":"https://github.com/seventag/seventag/pull/391#discussion_r50667252","pull_request_url":"https://api.github.com/repos/seventag/seventag/pulls/391","_links":{"self":{"href":"https://api.github.com/repos/seventag/seventag/pulls/comments/50667252"},"html":{"href":"https://github.com/seventag/seventag/pull/391#discussion_r50667252"},"pull_request":{"href":"https://api.github.com/repos/seventag/seventag/pulls/391"}}},"pull_request":{"url":"https://api.github.com/repos/seventag/seventag/pulls/391","id":56597139,"html_url":"https://github.com/seventag/seventag/pull/391","diff_url":"https://github.com/seventag/seventag/pull/391.diff","patch_url":"https://github.com/seventag/seventag/pull/391.patch","issue_url":"https://api.github.com/repos/seventag/seventag/issues/391","number":391,"state":"open","locked":false,"title":"TM-1040 Editor linitng","user":{"login":"MarcinMat","id":15210449,"avatar_url":"https://avatars.githubusercontent.com/u/15210449?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinMat","html_url":"https://github.com/MarcinMat","followers_url":"https://api.github.com/users/MarcinMat/followers","following_url":"https://api.github.com/users/MarcinMat/following{/other_user}","gists_url":"https://api.github.com/users/MarcinMat/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinMat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinMat/subscriptions","organizations_url":"https://api.github.com/users/MarcinMat/orgs","repos_url":"https://api.github.com/users/MarcinMat/repos","events_url":"https://api.github.com/users/MarcinMat/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinMat/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-20T11:45:28Z","updated_at":"2016-01-25T08:57:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"525b78d074a678ba9f2ade570655c4a7b592ff1a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/seventag/seventag/pulls/391/commits","review_comments_url":"https://api.github.com/repos/seventag/seventag/pulls/391/comments","review_comment_url":"https://api.github.com/repos/seventag/seventag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seventag/seventag/issues/391/comments","statuses_url":"https://api.github.com/repos/seventag/seventag/statuses/0c86b30d2a198e7f6a8c0ee4c271d32050b82f38","head":{"label":"seventag:feature/TM-1040-editor-linting","ref":"feature/TM-1040-editor-linting","sha":"0c86b30d2a198e7f6a8c0ee4c271d32050b82f38","user":{"login":"seventag","id":11617285,"avatar_url":"https://avatars.githubusercontent.com/u/11617285?v=3","gravatar_id":"","url":"https://api.github.com/users/seventag","html_url":"https://github.com/seventag","followers_url":"https://api.github.com/users/seventag/followers","following_url":"https://api.github.com/users/seventag/following{/other_user}","gists_url":"https://api.github.com/users/seventag/gists{/gist_id}","starred_url":"https://api.github.com/users/seventag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seventag/subscriptions","organizations_url":"https://api.github.com/users/seventag/orgs","repos_url":"https://api.github.com/users/seventag/repos","events_url":"https://api.github.com/users/seventag/events{/privacy}","received_events_url":"https://api.github.com/users/seventag/received_events","type":"Organization","site_admin":false},"repo":{"id":32939880,"name":"seventag","full_name":"seventag/seventag","owner":{"login":"seventag","id":11617285,"avatar_url":"https://avatars.githubusercontent.com/u/11617285?v=3","gravatar_id":"","url":"https://api.github.com/users/seventag","html_url":"https://github.com/seventag","followers_url":"https://api.github.com/users/seventag/followers","following_url":"https://api.github.com/users/seventag/following{/other_user}","gists_url":"https://api.github.com/users/seventag/gists{/gist_id}","starred_url":"https://api.github.com/users/seventag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seventag/subscriptions","organizations_url":"https://api.github.com/users/seventag/orgs","repos_url":"https://api.github.com/users/seventag/repos","events_url":"https://api.github.com/users/seventag/events{/privacy}","received_events_url":"https://api.github.com/users/seventag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seventag/seventag","description":"","fork":false,"url":"https://api.github.com/repos/seventag/seventag","forks_url":"https://api.github.com/repos/seventag/seventag/forks","keys_url":"https://api.github.com/repos/seventag/seventag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seventag/seventag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seventag/seventag/teams","hooks_url":"https://api.github.com/repos/seventag/seventag/hooks","issue_events_url":"https://api.github.com/repos/seventag/seventag/issues/events{/number}","events_url":"https://api.github.com/repos/seventag/seventag/events","assignees_url":"https://api.github.com/repos/seventag/seventag/assignees{/user}","branches_url":"https://api.github.com/repos/seventag/seventag/branches{/branch}","tags_url":"https://api.github.com/repos/seventag/seventag/tags","blobs_url":"https://api.github.com/repos/seventag/seventag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seventag/seventag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seventag/seventag/git/refs{/sha}","trees_url":"https://api.github.com/repos/seventag/seventag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seventag/seventag/statuses/{sha}","languages_url":"https://api.github.com/repos/seventag/seventag/languages","stargazers_url":"https://api.github.com/repos/seventag/seventag/stargazers","contributors_url":"https://api.github.com/repos/seventag/seventag/contributors","subscribers_url":"https://api.github.com/repos/seventag/seventag/subscribers","subscription_url":"https://api.github.com/repos/seventag/seventag/subscription","commits_url":"https://api.github.com/repos/seventag/seventag/commits{/sha}","git_commits_url":"https://api.github.com/repos/seventag/seventag/git/commits{/sha}","comments_url":"https://api.github.com/repos/seventag/seventag/comments{/number}","issue_comment_url":"https://api.github.com/repos/seventag/seventag/issues/comments{/number}","contents_url":"https://api.github.com/repos/seventag/seventag/contents/{+path}","compare_url":"https://api.github.com/repos/seventag/seventag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seventag/seventag/merges","archive_url":"https://api.github.com/repos/seventag/seventag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seventag/seventag/downloads","issues_url":"https://api.github.com/repos/seventag/seventag/issues{/number}","pulls_url":"https://api.github.com/repos/seventag/seventag/pulls{/number}","milestones_url":"https://api.github.com/repos/seventag/seventag/milestones{/number}","notifications_url":"https://api.github.com/repos/seventag/seventag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seventag/seventag/labels{/name}","releases_url":"https://api.github.com/repos/seventag/seventag/releases{/id}","deployments_url":"https://api.github.com/repos/seventag/seventag/deployments","created_at":"2015-03-26T16:46:33Z","updated_at":"2016-01-21T16:49:04Z","pushed_at":"2016-01-22T11:53:47Z","git_url":"git://github.com/seventag/seventag.git","ssh_url":"git@github.com:seventag/seventag.git","clone_url":"https://github.com/seventag/seventag.git","svn_url":"https://github.com/seventag/seventag","homepage":null,"size":4876,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":17,"forks":5,"open_issues":17,"watchers":17,"default_branch":"develop"}},"base":{"label":"seventag:develop","ref":"develop","sha":"c9422bd8c4efcb0b60be1342feec1fde760aa824","user":{"login":"seventag","id":11617285,"avatar_url":"https://avatars.githubusercontent.com/u/11617285?v=3","gravatar_id":"","url":"https://api.github.com/users/seventag","html_url":"https://github.com/seventag","followers_url":"https://api.github.com/users/seventag/followers","following_url":"https://api.github.com/users/seventag/following{/other_user}","gists_url":"https://api.github.com/users/seventag/gists{/gist_id}","starred_url":"https://api.github.com/users/seventag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seventag/subscriptions","organizations_url":"https://api.github.com/users/seventag/orgs","repos_url":"https://api.github.com/users/seventag/repos","events_url":"https://api.github.com/users/seventag/events{/privacy}","received_events_url":"https://api.github.com/users/seventag/received_events","type":"Organization","site_admin":false},"repo":{"id":32939880,"name":"seventag","full_name":"seventag/seventag","owner":{"login":"seventag","id":11617285,"avatar_url":"https://avatars.githubusercontent.com/u/11617285?v=3","gravatar_id":"","url":"https://api.github.com/users/seventag","html_url":"https://github.com/seventag","followers_url":"https://api.github.com/users/seventag/followers","following_url":"https://api.github.com/users/seventag/following{/other_user}","gists_url":"https://api.github.com/users/seventag/gists{/gist_id}","starred_url":"https://api.github.com/users/seventag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seventag/subscriptions","organizations_url":"https://api.github.com/users/seventag/orgs","repos_url":"https://api.github.com/users/seventag/repos","events_url":"https://api.github.com/users/seventag/events{/privacy}","received_events_url":"https://api.github.com/users/seventag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seventag/seventag","description":"","fork":false,"url":"https://api.github.com/repos/seventag/seventag","forks_url":"https://api.github.com/repos/seventag/seventag/forks","keys_url":"https://api.github.com/repos/seventag/seventag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seventag/seventag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seventag/seventag/teams","hooks_url":"https://api.github.com/repos/seventag/seventag/hooks","issue_events_url":"https://api.github.com/repos/seventag/seventag/issues/events{/number}","events_url":"https://api.github.com/repos/seventag/seventag/events","assignees_url":"https://api.github.com/repos/seventag/seventag/assignees{/user}","branches_url":"https://api.github.com/repos/seventag/seventag/branches{/branch}","tags_url":"https://api.github.com/repos/seventag/seventag/tags","blobs_url":"https://api.github.com/repos/seventag/seventag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seventag/seventag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seventag/seventag/git/refs{/sha}","trees_url":"https://api.github.com/repos/seventag/seventag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seventag/seventag/statuses/{sha}","languages_url":"https://api.github.com/repos/seventag/seventag/languages","stargazers_url":"https://api.github.com/repos/seventag/seventag/stargazers","contributors_url":"https://api.github.com/repos/seventag/seventag/contributors","subscribers_url":"https://api.github.com/repos/seventag/seventag/subscribers","subscription_url":"https://api.github.com/repos/seventag/seventag/subscription","commits_url":"https://api.github.com/repos/seventag/seventag/commits{/sha}","git_commits_url":"https://api.github.com/repos/seventag/seventag/git/commits{/sha}","comments_url":"https://api.github.com/repos/seventag/seventag/comments{/number}","issue_comment_url":"https://api.github.com/repos/seventag/seventag/issues/comments{/number}","contents_url":"https://api.github.com/repos/seventag/seventag/contents/{+path}","compare_url":"https://api.github.com/repos/seventag/seventag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seventag/seventag/merges","archive_url":"https://api.github.com/repos/seventag/seventag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seventag/seventag/downloads","issues_url":"https://api.github.com/repos/seventag/seventag/issues{/number}","pulls_url":"https://api.github.com/repos/seventag/seventag/pulls{/number}","milestones_url":"https://api.github.com/repos/seventag/seventag/milestones{/number}","notifications_url":"https://api.github.com/repos/seventag/seventag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seventag/seventag/labels{/name}","releases_url":"https://api.github.com/repos/seventag/seventag/releases{/id}","deployments_url":"https://api.github.com/repos/seventag/seventag/deployments","created_at":"2015-03-26T16:46:33Z","updated_at":"2016-01-21T16:49:04Z","pushed_at":"2016-01-22T11:53:47Z","git_url":"git://github.com/seventag/seventag.git","ssh_url":"git@github.com:seventag/seventag.git","clone_url":"https://github.com/seventag/seventag.git","svn_url":"https://github.com/seventag/seventag","homepage":null,"size":4876,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":17,"forks":5,"open_issues":17,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/seventag/seventag/pulls/391"},"html":{"href":"https://github.com/seventag/seventag/pull/391"},"issue":{"href":"https://api.github.com/repos/seventag/seventag/issues/391"},"comments":{"href":"https://api.github.com/repos/seventag/seventag/issues/391/comments"},"review_comments":{"href":"https://api.github.com/repos/seventag/seventag/pulls/391/comments"},"review_comment":{"href":"https://api.github.com/repos/seventag/seventag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seventag/seventag/pulls/391/commits"},"statuses":{"href":"https://api.github.com/repos/seventag/seventag/statuses/0c86b30d2a198e7f6a8c0ee4c271d32050b82f38"}}}}