GitHub PullRequestEvent at 2014-11-19 16:48:00
Repository: broccoli-handlebars
Actor: greghuc
Payload: {"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1","id":24702380,"html_url":"https://github.com/moudy/broccoli-handlebars/pull/1","diff_url":"https://github.com/moudy/broccoli-handlebars/pull/1.diff","patch_url":"https://github.com/moudy/broccoli-handlebars/pull/1.patch","issue_url":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/1","number":1,"state":"open","locked":false,"title":"Fix 'context is value' bug","user":{"login":"greghuc","id":5345870,"avatar_url":"https://avatars.githubusercontent.com/u/5345870?v=3","gravatar_id":"","url":"https://api.github.com/users/greghuc","html_url":"https://github.com/greghuc","followers_url":"https://api.github.com/users/greghuc/followers","following_url":"https://api.github.com/users/greghuc/following{/other_user}","gists_url":"https://api.github.com/users/greghuc/gists{/gist_id}","starred_url":"https://api.github.com/users/greghuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghuc/subscriptions","organizations_url":"https://api.github.com/users/greghuc/orgs","repos_url":"https://api.github.com/users/greghuc/repos","events_url":"https://api.github.com/users/greghuc/events{/privacy}","received_events_url":"https://api.github.com/users/greghuc/received_events","type":"User","site_admin":false},"body":"Hi there,\r\n\r\nThis pull request fixes a crash that occurs when options.context is absent or not a function.\r\n\r\nE.g. this config causes the following crash:\r\n\r\n```\r\nvar htmlPages = compileHandlebars('pages', ['*.hbs'], {\r\n    partials: 'pages/partials'\r\n});\r\n\r\nCrashes at:\r\nTypeError: Property 'context' of object [object Object] is not a function\r\n  at /vagrant/node_modules/broccoli-handlebars/index.js:79:35\r\n  at Array.map (native)\r\n  at /vagrant/node_modules/broccoli-handlebars/index.js:69:33\r\n```\r\n\r\nThe crash happens because - even if options.context is not a function - it is still called as one on this line: https://github.com/moudy/broccoli-handlebars/blob/master/index.js#L79\r\n\r\nI tested this by rerunning the code post-fix, and no crash occurs.\r\n\r\nCheers\r\n\r\nGreg\r\n","created_at":"2014-11-19T16:47:59Z","updated_at":"2014-11-19T16:47:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1/commits","review_comments_url":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1/comments","review_comment_url":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/comments/{number}","comments_url":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/1/comments","statuses_url":"https://api.github.com/repos/moudy/broccoli-handlebars/statuses/39331ea4dfd98c26325fbbe848c0b9e9aeff860d","head":{"label":"greghuc:context-bug","ref":"context-bug","sha":"39331ea4dfd98c26325fbbe848c0b9e9aeff860d","user":{"login":"greghuc","id":5345870,"avatar_url":"https://avatars.githubusercontent.com/u/5345870?v=3","gravatar_id":"","url":"https://api.github.com/users/greghuc","html_url":"https://github.com/greghuc","followers_url":"https://api.github.com/users/greghuc/followers","following_url":"https://api.github.com/users/greghuc/following{/other_user}","gists_url":"https://api.github.com/users/greghuc/gists{/gist_id}","starred_url":"https://api.github.com/users/greghuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghuc/subscriptions","organizations_url":"https://api.github.com/users/greghuc/orgs","repos_url":"https://api.github.com/users/greghuc/repos","events_url":"https://api.github.com/users/greghuc/events{/privacy}","received_events_url":"https://api.github.com/users/greghuc/received_events","type":"User","site_admin":false},"repo":{"id":26868852,"name":"broccoli-handlebars","full_name":"greghuc/broccoli-handlebars","owner":{"login":"greghuc","id":5345870,"avatar_url":"https://avatars.githubusercontent.com/u/5345870?v=3","gravatar_id":"","url":"https://api.github.com/users/greghuc","html_url":"https://github.com/greghuc","followers_url":"https://api.github.com/users/greghuc/followers","following_url":"https://api.github.com/users/greghuc/following{/other_user}","gists_url":"https://api.github.com/users/greghuc/gists{/gist_id}","starred_url":"https://api.github.com/users/greghuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghuc/subscriptions","organizations_url":"https://api.github.com/users/greghuc/orgs","repos_url":"https://api.github.com/users/greghuc/repos","events_url":"https://api.github.com/users/greghuc/events{/privacy}","received_events_url":"https://api.github.com/users/greghuc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/greghuc/broccoli-handlebars","description":"Compile handlebars templates with helpers and dynamic contexts","fork":true,"url":"https://api.github.com/repos/greghuc/broccoli-handlebars","forks_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/forks","keys_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/teams","hooks_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/hooks","issue_events_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/issues/events{/number}","events_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/events","assignees_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/assignees{/user}","branches_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/branches{/branch}","tags_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/tags","blobs_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/git/refs{/sha}","trees_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/statuses/{sha}","languages_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/languages","stargazers_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/stargazers","contributors_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/contributors","subscribers_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/subscribers","subscription_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/subscription","commits_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/commits{/sha}","git_commits_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/git/commits{/sha}","comments_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/comments{/number}","issue_comment_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/issues/comments/{number}","contents_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/contents/{+path}","compare_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/merges","archive_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/downloads","issues_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/issues{/number}","pulls_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/pulls{/number}","milestones_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/milestones{/number}","notifications_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/labels{/name}","releases_url":"https://api.github.com/repos/greghuc/broccoli-handlebars/releases{/id}","created_at":"2014-11-19T15:55:10Z","updated_at":"2014-11-19T15:55:10Z","pushed_at":"2014-11-19T16:30:04Z","git_url":"git://github.com/greghuc/broccoli-handlebars.git","ssh_url":"git@github.com:greghuc/broccoli-handlebars.git","clone_url":"https://github.com/greghuc/broccoli-handlebars.git","svn_url":"https://github.com/greghuc/broccoli-handlebars","homepage":null,"size":85,"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":"moudy:master","ref":"master","sha":"78a7b2cf587989e47d774b6391047e3761cd6f58","user":{"login":"moudy","id":241024,"avatar_url":"https://avatars.githubusercontent.com/u/241024?v=3","gravatar_id":"","url":"https://api.github.com/users/moudy","html_url":"https://github.com/moudy","followers_url":"https://api.github.com/users/moudy/followers","following_url":"https://api.github.com/users/moudy/following{/other_user}","gists_url":"https://api.github.com/users/moudy/gists{/gist_id}","starred_url":"https://api.github.com/users/moudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moudy/subscriptions","organizations_url":"https://api.github.com/users/moudy/orgs","repos_url":"https://api.github.com/users/moudy/repos","events_url":"https://api.github.com/users/moudy/events{/privacy}","received_events_url":"https://api.github.com/users/moudy/received_events","type":"User","site_admin":false},"repo":{"id":21793343,"name":"broccoli-handlebars","full_name":"moudy/broccoli-handlebars","owner":{"login":"moudy","id":241024,"avatar_url":"https://avatars.githubusercontent.com/u/241024?v=3","gravatar_id":"","url":"https://api.github.com/users/moudy","html_url":"https://github.com/moudy","followers_url":"https://api.github.com/users/moudy/followers","following_url":"https://api.github.com/users/moudy/following{/other_user}","gists_url":"https://api.github.com/users/moudy/gists{/gist_id}","starred_url":"https://api.github.com/users/moudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moudy/subscriptions","organizations_url":"https://api.github.com/users/moudy/orgs","repos_url":"https://api.github.com/users/moudy/repos","events_url":"https://api.github.com/users/moudy/events{/privacy}","received_events_url":"https://api.github.com/users/moudy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moudy/broccoli-handlebars","description":"Compile handlebars templates with helpers and dynamic contexts","fork":false,"url":"https://api.github.com/repos/moudy/broccoli-handlebars","forks_url":"https://api.github.com/repos/moudy/broccoli-handlebars/forks","keys_url":"https://api.github.com/repos/moudy/broccoli-handlebars/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moudy/broccoli-handlebars/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moudy/broccoli-handlebars/teams","hooks_url":"https://api.github.com/repos/moudy/broccoli-handlebars/hooks","issue_events_url":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/events{/number}","events_url":"https://api.github.com/repos/moudy/broccoli-handlebars/events","assignees_url":"https://api.github.com/repos/moudy/broccoli-handlebars/assignees{/user}","branches_url":"https://api.github.com/repos/moudy/broccoli-handlebars/branches{/branch}","tags_url":"https://api.github.com/repos/moudy/broccoli-handlebars/tags","blobs_url":"https://api.github.com/repos/moudy/broccoli-handlebars/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moudy/broccoli-handlebars/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moudy/broccoli-handlebars/git/refs{/sha}","trees_url":"https://api.github.com/repos/moudy/broccoli-handlebars/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moudy/broccoli-handlebars/statuses/{sha}","languages_url":"https://api.github.com/repos/moudy/broccoli-handlebars/languages","stargazers_url":"https://api.github.com/repos/moudy/broccoli-handlebars/stargazers","contributors_url":"https://api.github.com/repos/moudy/broccoli-handlebars/contributors","subscribers_url":"https://api.github.com/repos/moudy/broccoli-handlebars/subscribers","subscription_url":"https://api.github.com/repos/moudy/broccoli-handlebars/subscription","commits_url":"https://api.github.com/repos/moudy/broccoli-handlebars/commits{/sha}","git_commits_url":"https://api.github.com/repos/moudy/broccoli-handlebars/git/commits{/sha}","comments_url":"https://api.github.com/repos/moudy/broccoli-handlebars/comments{/number}","issue_comment_url":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/comments/{number}","contents_url":"https://api.github.com/repos/moudy/broccoli-handlebars/contents/{+path}","compare_url":"https://api.github.com/repos/moudy/broccoli-handlebars/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moudy/broccoli-handlebars/merges","archive_url":"https://api.github.com/repos/moudy/broccoli-handlebars/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moudy/broccoli-handlebars/downloads","issues_url":"https://api.github.com/repos/moudy/broccoli-handlebars/issues{/number}","pulls_url":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls{/number}","milestones_url":"https://api.github.com/repos/moudy/broccoli-handlebars/milestones{/number}","notifications_url":"https://api.github.com/repos/moudy/broccoli-handlebars/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moudy/broccoli-handlebars/labels{/name}","releases_url":"https://api.github.com/repos/moudy/broccoli-handlebars/releases{/id}","created_at":"2014-07-13T15:22:19Z","updated_at":"2014-07-13T15:22:38Z","pushed_at":"2014-07-23T12:28:00Z","git_url":"git://github.com/moudy/broccoli-handlebars.git","ssh_url":"git@github.com:moudy/broccoli-handlebars.git","clone_url":"https://github.com/moudy/broccoli-handlebars.git","svn_url":"https://github.com/moudy/broccoli-handlebars","homepage":null,"size":152,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1"},"html":{"href":"https://github.com/moudy/broccoli-handlebars/pull/1"},"issue":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/1"},"comments":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/moudy/broccoli-handlebars/statuses/39331ea4dfd98c26325fbbe848c0b9e9aeff860d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":8,"deletions":9,"changed_files":1}}