{"action":"created","comment":{"url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/comments/223899110","pull_request_review_id":163140512,"id":223899110,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzg5OTExMA==","diff_hunk":"@@ -63,6 +63,31 @@ function compileInsight(ast) {\n   return json;\n }\n \n+function compileQuestion(ast) {\n+  if (!ast || !ast.children) {\n+    throw new Error('Missing or invalid AST');","path":"packages/curriculum-compiler-json/index.js","position":6,"original_position":6,"commit_id":"61eb180647be4b0654d597f4ba0e8a83df03fc44","original_commit_id":"61eb180647be4b0654d597f4ba0e8a83df03fc44","user":{"login":"nem035","id":9661806,"node_id":"MDQ6VXNlcjk2NjE4MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/9661806?v=4","gravatar_id":"","url":"https://api.github.com/users/nem035","html_url":"https://github.com/nem035","followers_url":"https://api.github.com/users/nem035/followers","following_url":"https://api.github.com/users/nem035/following{/other_user}","gists_url":"https://api.github.com/users/nem035/gists{/gist_id}","starred_url":"https://api.github.com/users/nem035/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nem035/subscriptions","organizations_url":"https://api.github.com/users/nem035/orgs","repos_url":"https://api.github.com/users/nem035/repos","events_url":"https://api.github.com/users/nem035/events{/privacy}","received_events_url":"https://api.github.com/users/nem035/received_events","type":"User","site_admin":false},"body":"It's equivalent to `throw Error(...)`","created_at":"2018-10-09T23:47:45Z","updated_at":"2018-10-09T23:47:45Z","html_url":"https://github.com/enkidevs/curriculum-processors/pull/27#discussion_r223899110","pull_request_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/comments/223899110"},"html":{"href":"https://github.com/enkidevs/curriculum-processors/pull/27#discussion_r223899110"},"pull_request":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27"}},"in_reply_to_id":223899085},"pull_request":{"url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27","id":221594835,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNTk0ODM1","html_url":"https://github.com/enkidevs/curriculum-processors/pull/27","diff_url":"https://github.com/enkidevs/curriculum-processors/pull/27.diff","patch_url":"https://github.com/enkidevs/curriculum-processors/pull/27.patch","issue_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/27","number":27,"state":"open","locked":false,"title":"Adding question-type AST ➡️ JSON compiler","user":{"login":"milesflo","id":14067660,"node_id":"MDQ6VXNlcjE0MDY3NjYw","avatar_url":"https://avatars1.githubusercontent.com/u/14067660?v=4","gravatar_id":"","url":"https://api.github.com/users/milesflo","html_url":"https://github.com/milesflo","followers_url":"https://api.github.com/users/milesflo/followers","following_url":"https://api.github.com/users/milesflo/following{/other_user}","gists_url":"https://api.github.com/users/milesflo/gists{/gist_id}","starred_url":"https://api.github.com/users/milesflo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milesflo/subscriptions","organizations_url":"https://api.github.com/users/milesflo/orgs","repos_url":"https://api.github.com/users/milesflo/repos","events_url":"https://api.github.com/users/milesflo/events{/privacy}","received_events_url":"https://api.github.com/users/milesflo/received_events","type":"User","site_admin":false},"body":"## [Input](https://github.com/enkidevs/curriculum-processors/pull/27/files#diff-98396dd1bb7939830ecd9300bd81012a) ➡️ [Output](https://github.com/enkidevs/curriculum-processors/pull/27/files#diff-69b8287926e8d0a40a6e04f047aaab09)\r\n\r\n- [x] Add case for handling `contentTypes.QUESTION` in `getCompiler` method\r\n- [x] Add `compileQuestion` function\r\n    - Function expects [question-type AST](https://github.com/enkidevs/curriculum-processors/blob/master/packages/curriculum-parser-markdown/index.js#L12)\r\n    - Determine the question type from the `heading` node.\r\n    - Wraps question AST in a `section` node, as it would be in an Insight-type AST\r\n    - Returns the result of the question compiler\r\n- [x] Add test case\r\n- [x] Update documentation to reference Question type compiler, and distinct between Insight/Exercise compiler and Question compiler","created_at":"2018-10-09T21:40:49Z","updated_at":"2018-10-09T23:47:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"494b7ddc5d6e1e1f4da5dae8133df021d63afed4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27/commits","review_comments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27/comments","review_comment_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/27/comments","statuses_url":"https://api.github.com/repos/enkidevs/curriculum-processors/statuses/61eb180647be4b0654d597f4ba0e8a83df03fc44","head":{"label":"enkidevs:question-compiler","ref":"question-compiler","sha":"61eb180647be4b0654d597f4ba0e8a83df03fc44","user":{"login":"enkidevs","id":12428872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDI4ODcy","avatar_url":"https://avatars0.githubusercontent.com/u/12428872?v=4","gravatar_id":"","url":"https://api.github.com/users/enkidevs","html_url":"https://github.com/enkidevs","followers_url":"https://api.github.com/users/enkidevs/followers","following_url":"https://api.github.com/users/enkidevs/following{/other_user}","gists_url":"https://api.github.com/users/enkidevs/gists{/gist_id}","starred_url":"https://api.github.com/users/enkidevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enkidevs/subscriptions","organizations_url":"https://api.github.com/users/enkidevs/orgs","repos_url":"https://api.github.com/users/enkidevs/repos","events_url":"https://api.github.com/users/enkidevs/events{/privacy}","received_events_url":"https://api.github.com/users/enkidevs/received_events","type":"Organization","site_admin":false},"repo":{"id":125154195,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUxNTQxOTU=","name":"curriculum-processors","full_name":"enkidevs/curriculum-processors","private":false,"owner":{"login":"enkidevs","id":12428872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDI4ODcy","avatar_url":"https://avatars0.githubusercontent.com/u/12428872?v=4","gravatar_id":"","url":"https://api.github.com/users/enkidevs","html_url":"https://github.com/enkidevs","followers_url":"https://api.github.com/users/enkidevs/followers","following_url":"https://api.github.com/users/enkidevs/following{/other_user}","gists_url":"https://api.github.com/users/enkidevs/gists{/gist_id}","starred_url":"https://api.github.com/users/enkidevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enkidevs/subscriptions","organizations_url":"https://api.github.com/users/enkidevs/orgs","repos_url":"https://api.github.com/users/enkidevs/repos","events_url":"https://api.github.com/users/enkidevs/events{/privacy}","received_events_url":"https://api.github.com/users/enkidevs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/enkidevs/curriculum-processors","description":"Parser & Compiler (and related tools) for processing Enki curriculum","fork":false,"url":"https://api.github.com/repos/enkidevs/curriculum-processors","forks_url":"https://api.github.com/repos/enkidevs/curriculum-processors/forks","keys_url":"https://api.github.com/repos/enkidevs/curriculum-processors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enkidevs/curriculum-processors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enkidevs/curriculum-processors/teams","hooks_url":"https://api.github.com/repos/enkidevs/curriculum-processors/hooks","issue_events_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/events{/number}","events_url":"https://api.github.com/repos/enkidevs/curriculum-processors/events","assignees_url":"https://api.github.com/repos/enkidevs/curriculum-processors/assignees{/user}","branches_url":"https://api.github.com/repos/enkidevs/curriculum-processors/branches{/branch}","tags_url":"https://api.github.com/repos/enkidevs/curriculum-processors/tags","blobs_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/refs{/sha}","trees_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enkidevs/curriculum-processors/statuses/{sha}","languages_url":"https://api.github.com/repos/enkidevs/curriculum-processors/languages","stargazers_url":"https://api.github.com/repos/enkidevs/curriculum-processors/stargazers","contributors_url":"https://api.github.com/repos/enkidevs/curriculum-processors/contributors","subscribers_url":"https://api.github.com/repos/enkidevs/curriculum-processors/subscribers","subscription_url":"https://api.github.com/repos/enkidevs/curriculum-processors/subscription","commits_url":"https://api.github.com/repos/enkidevs/curriculum-processors/commits{/sha}","git_commits_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/commits{/sha}","comments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/comments{/number}","issue_comment_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/comments{/number}","contents_url":"https://api.github.com/repos/enkidevs/curriculum-processors/contents/{+path}","compare_url":"https://api.github.com/repos/enkidevs/curriculum-processors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enkidevs/curriculum-processors/merges","archive_url":"https://api.github.com/repos/enkidevs/curriculum-processors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enkidevs/curriculum-processors/downloads","issues_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues{/number}","pulls_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls{/number}","milestones_url":"https://api.github.com/repos/enkidevs/curriculum-processors/milestones{/number}","notifications_url":"https://api.github.com/repos/enkidevs/curriculum-processors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enkidevs/curriculum-processors/labels{/name}","releases_url":"https://api.github.com/repos/enkidevs/curriculum-processors/releases{/id}","deployments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/deployments","created_at":"2018-03-14T04:16:38Z","updated_at":"2018-09-28T19:32:50Z","pushed_at":"2018-10-09T22:14:35Z","git_url":"git://github.com/enkidevs/curriculum-processors.git","ssh_url":"git@github.com:enkidevs/curriculum-processors.git","clone_url":"https://github.com/enkidevs/curriculum-processors.git","svn_url":"https://github.com/enkidevs/curriculum-processors","homepage":"https://github.com/enkidevs/curriculum-processors","size":379,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"enkidevs:master","ref":"master","sha":"77de51c2251fd36bb97d177d7f34a7c8ed2126e3","user":{"login":"enkidevs","id":12428872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDI4ODcy","avatar_url":"https://avatars0.githubusercontent.com/u/12428872?v=4","gravatar_id":"","url":"https://api.github.com/users/enkidevs","html_url":"https://github.com/enkidevs","followers_url":"https://api.github.com/users/enkidevs/followers","following_url":"https://api.github.com/users/enkidevs/following{/other_user}","gists_url":"https://api.github.com/users/enkidevs/gists{/gist_id}","starred_url":"https://api.github.com/users/enkidevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enkidevs/subscriptions","organizations_url":"https://api.github.com/users/enkidevs/orgs","repos_url":"https://api.github.com/users/enkidevs/repos","events_url":"https://api.github.com/users/enkidevs/events{/privacy}","received_events_url":"https://api.github.com/users/enkidevs/received_events","type":"Organization","site_admin":false},"repo":{"id":125154195,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUxNTQxOTU=","name":"curriculum-processors","full_name":"enkidevs/curriculum-processors","private":false,"owner":{"login":"enkidevs","id":12428872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDI4ODcy","avatar_url":"https://avatars0.githubusercontent.com/u/12428872?v=4","gravatar_id":"","url":"https://api.github.com/users/enkidevs","html_url":"https://github.com/enkidevs","followers_url":"https://api.github.com/users/enkidevs/followers","following_url":"https://api.github.com/users/enkidevs/following{/other_user}","gists_url":"https://api.github.com/users/enkidevs/gists{/gist_id}","starred_url":"https://api.github.com/users/enkidevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enkidevs/subscriptions","organizations_url":"https://api.github.com/users/enkidevs/orgs","repos_url":"https://api.github.com/users/enkidevs/repos","events_url":"https://api.github.com/users/enkidevs/events{/privacy}","received_events_url":"https://api.github.com/users/enkidevs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/enkidevs/curriculum-processors","description":"Parser & Compiler (and related tools) for processing Enki curriculum","fork":false,"url":"https://api.github.com/repos/enkidevs/curriculum-processors","forks_url":"https://api.github.com/repos/enkidevs/curriculum-processors/forks","keys_url":"https://api.github.com/repos/enkidevs/curriculum-processors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enkidevs/curriculum-processors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enkidevs/curriculum-processors/teams","hooks_url":"https://api.github.com/repos/enkidevs/curriculum-processors/hooks","issue_events_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/events{/number}","events_url":"https://api.github.com/repos/enkidevs/curriculum-processors/events","assignees_url":"https://api.github.com/repos/enkidevs/curriculum-processors/assignees{/user}","branches_url":"https://api.github.com/repos/enkidevs/curriculum-processors/branches{/branch}","tags_url":"https://api.github.com/repos/enkidevs/curriculum-processors/tags","blobs_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/refs{/sha}","trees_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enkidevs/curriculum-processors/statuses/{sha}","languages_url":"https://api.github.com/repos/enkidevs/curriculum-processors/languages","stargazers_url":"https://api.github.com/repos/enkidevs/curriculum-processors/stargazers","contributors_url":"https://api.github.com/repos/enkidevs/curriculum-processors/contributors","subscribers_url":"https://api.github.com/repos/enkidevs/curriculum-processors/subscribers","subscription_url":"https://api.github.com/repos/enkidevs/curriculum-processors/subscription","commits_url":"https://api.github.com/repos/enkidevs/curriculum-processors/commits{/sha}","git_commits_url":"https://api.github.com/repos/enkidevs/curriculum-processors/git/commits{/sha}","comments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/comments{/number}","issue_comment_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/comments{/number}","contents_url":"https://api.github.com/repos/enkidevs/curriculum-processors/contents/{+path}","compare_url":"https://api.github.com/repos/enkidevs/curriculum-processors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enkidevs/curriculum-processors/merges","archive_url":"https://api.github.com/repos/enkidevs/curriculum-processors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enkidevs/curriculum-processors/downloads","issues_url":"https://api.github.com/repos/enkidevs/curriculum-processors/issues{/number}","pulls_url":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls{/number}","milestones_url":"https://api.github.com/repos/enkidevs/curriculum-processors/milestones{/number}","notifications_url":"https://api.github.com/repos/enkidevs/curriculum-processors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enkidevs/curriculum-processors/labels{/name}","releases_url":"https://api.github.com/repos/enkidevs/curriculum-processors/releases{/id}","deployments_url":"https://api.github.com/repos/enkidevs/curriculum-processors/deployments","created_at":"2018-03-14T04:16:38Z","updated_at":"2018-09-28T19:32:50Z","pushed_at":"2018-10-09T22:14:35Z","git_url":"git://github.com/enkidevs/curriculum-processors.git","ssh_url":"git@github.com:enkidevs/curriculum-processors.git","clone_url":"https://github.com/enkidevs/curriculum-processors.git","svn_url":"https://github.com/enkidevs/curriculum-processors","homepage":"https://github.com/enkidevs/curriculum-processors","size":379,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27"},"html":{"href":"https://github.com/enkidevs/curriculum-processors/pull/27"},"issue":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/27"},"comments":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/enkidevs/curriculum-processors/statuses/61eb180647be4b0654d597f4ba0e8a83df03fc44"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nem035"}}