{"action":"opened","number":154,"pull_request":{"url":"https://api.github.com/repos/olov/ng-annotate/pulls/154","id":32327305,"html_url":"https://github.com/olov/ng-annotate/pull/154","diff_url":"https://github.com/olov/ng-annotate/pull/154.diff","patch_url":"https://github.com/olov/ng-annotate/pull/154.patch","issue_url":"https://api.github.com/repos/olov/ng-annotate/issues/154","number":154,"state":"open","locked":false,"title":"\"ngInject\" directive can be anywhere inside a function","user":{"login":"tomca32","id":3384784,"avatar_url":"https://avatars.githubusercontent.com/u/3384784?v=3","gravatar_id":"","url":"https://api.github.com/users/tomca32","html_url":"https://github.com/tomca32","followers_url":"https://api.github.com/users/tomca32/followers","following_url":"https://api.github.com/users/tomca32/following{/other_user}","gists_url":"https://api.github.com/users/tomca32/gists{/gist_id}","starred_url":"https://api.github.com/users/tomca32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomca32/subscriptions","organizations_url":"https://api.github.com/users/tomca32/orgs","repos_url":"https://api.github.com/users/tomca32/repos","events_url":"https://api.github.com/users/tomca32/events{/privacy}","received_events_url":"https://api.github.com/users/tomca32/received_events","type":"User","site_admin":false},"body":"This solves [issue#152](https://github.com/olov/ng-annotate/issues/152)\r\n\r\nSolving this issue is a pretty big priority for us since we use Coffeescript classes a lot in our codebase. As described in the issue above, none of the workarounds work in our case so scanning the full body of the function for \"ngInject\" seems to be the only option.\r\n\r\nmatchPrologueDirectives will now scan the whole body of the function instead of breaking after the first token.\r\nThe performance impact is minimal. I ran the performance test a thousand times and compared to the old version and it was slower by up to 2%.\r\n\r\nIf this is not acceptable, I could put it behind a flag, such as --fullscan.","created_at":"2015-03-31T14:26:36Z","updated_at":"2015-03-31T14:26:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/olov/ng-annotate/pulls/154/commits","review_comments_url":"https://api.github.com/repos/olov/ng-annotate/pulls/154/comments","review_comment_url":"https://api.github.com/repos/olov/ng-annotate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/olov/ng-annotate/issues/154/comments","statuses_url":"https://api.github.com/repos/olov/ng-annotate/statuses/fd3f4e9ee0232736ef687d374eb953981cac5204","head":{"label":"amplify-education:master","ref":"master","sha":"fd3f4e9ee0232736ef687d374eb953981cac5204","user":{"login":"amplify-education","id":107699,"avatar_url":"https://avatars.githubusercontent.com/u/107699?v=3","gravatar_id":"","url":"https://api.github.com/users/amplify-education","html_url":"https://github.com/amplify-education","followers_url":"https://api.github.com/users/amplify-education/followers","following_url":"https://api.github.com/users/amplify-education/following{/other_user}","gists_url":"https://api.github.com/users/amplify-education/gists{/gist_id}","starred_url":"https://api.github.com/users/amplify-education/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplify-education/subscriptions","organizations_url":"https://api.github.com/users/amplify-education/orgs","repos_url":"https://api.github.com/users/amplify-education/repos","events_url":"https://api.github.com/users/amplify-education/events{/privacy}","received_events_url":"https://api.github.com/users/amplify-education/received_events","type":"Organization","site_admin":false},"repo":{"id":33146250,"name":"ng-annotate","full_name":"amplify-education/ng-annotate","owner":{"login":"amplify-education","id":107699,"avatar_url":"https://avatars.githubusercontent.com/u/107699?v=3","gravatar_id":"","url":"https://api.github.com/users/amplify-education","html_url":"https://github.com/amplify-education","followers_url":"https://api.github.com/users/amplify-education/followers","following_url":"https://api.github.com/users/amplify-education/following{/other_user}","gists_url":"https://api.github.com/users/amplify-education/gists{/gist_id}","starred_url":"https://api.github.com/users/amplify-education/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplify-education/subscriptions","organizations_url":"https://api.github.com/users/amplify-education/orgs","repos_url":"https://api.github.com/users/amplify-education/repos","events_url":"https://api.github.com/users/amplify-education/events{/privacy}","received_events_url":"https://api.github.com/users/amplify-education/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplify-education/ng-annotate","description":"Add, remove and rebuild AngularJS dependency injection annotations","fork":true,"url":"https://api.github.com/repos/amplify-education/ng-annotate","forks_url":"https://api.github.com/repos/amplify-education/ng-annotate/forks","keys_url":"https://api.github.com/repos/amplify-education/ng-annotate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplify-education/ng-annotate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplify-education/ng-annotate/teams","hooks_url":"https://api.github.com/repos/amplify-education/ng-annotate/hooks","issue_events_url":"https://api.github.com/repos/amplify-education/ng-annotate/issues/events{/number}","events_url":"https://api.github.com/repos/amplify-education/ng-annotate/events","assignees_url":"https://api.github.com/repos/amplify-education/ng-annotate/assignees{/user}","branches_url":"https://api.github.com/repos/amplify-education/ng-annotate/branches{/branch}","tags_url":"https://api.github.com/repos/amplify-education/ng-annotate/tags","blobs_url":"https://api.github.com/repos/amplify-education/ng-annotate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplify-education/ng-annotate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplify-education/ng-annotate/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplify-education/ng-annotate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplify-education/ng-annotate/statuses/{sha}","languages_url":"https://api.github.com/repos/amplify-education/ng-annotate/languages","stargazers_url":"https://api.github.com/repos/amplify-education/ng-annotate/stargazers","contributors_url":"https://api.github.com/repos/amplify-education/ng-annotate/contributors","subscribers_url":"https://api.github.com/repos/amplify-education/ng-annotate/subscribers","subscription_url":"https://api.github.com/repos/amplify-education/ng-annotate/subscription","commits_url":"https://api.github.com/repos/amplify-education/ng-annotate/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplify-education/ng-annotate/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplify-education/ng-annotate/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplify-education/ng-annotate/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplify-education/ng-annotate/contents/{+path}","compare_url":"https://api.github.com/repos/amplify-education/ng-annotate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplify-education/ng-annotate/merges","archive_url":"https://api.github.com/repos/amplify-education/ng-annotate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplify-education/ng-annotate/downloads","issues_url":"https://api.github.com/repos/amplify-education/ng-annotate/issues{/number}","pulls_url":"https://api.github.com/repos/amplify-education/ng-annotate/pulls{/number}","milestones_url":"https://api.github.com/repos/amplify-education/ng-annotate/milestones{/number}","notifications_url":"https://api.github.com/repos/amplify-education/ng-annotate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplify-education/ng-annotate/labels{/name}","releases_url":"https://api.github.com/repos/amplify-education/ng-annotate/releases{/id}","created_at":"2015-03-30T20:27:55Z","updated_at":"2015-03-30T21:29:00Z","pushed_at":"2015-03-30T21:29:00Z","git_url":"git://github.com/amplify-education/ng-annotate.git","ssh_url":"git@github.com:amplify-education/ng-annotate.git","clone_url":"https://github.com/amplify-education/ng-annotate.git","svn_url":"https://github.com/amplify-education/ng-annotate","homepage":null,"size":1444,"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":"olov:master","ref":"master","sha":"97f29c74925cf3dcaa56356878c756e6c7e21fba","user":{"login":"olov","id":19247,"avatar_url":"https://avatars.githubusercontent.com/u/19247?v=3","gravatar_id":"","url":"https://api.github.com/users/olov","html_url":"https://github.com/olov","followers_url":"https://api.github.com/users/olov/followers","following_url":"https://api.github.com/users/olov/following{/other_user}","gists_url":"https://api.github.com/users/olov/gists{/gist_id}","starred_url":"https://api.github.com/users/olov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olov/subscriptions","organizations_url":"https://api.github.com/users/olov/orgs","repos_url":"https://api.github.com/users/olov/repos","events_url":"https://api.github.com/users/olov/events{/privacy}","received_events_url":"https://api.github.com/users/olov/received_events","type":"User","site_admin":false},"repo":{"id":12560434,"name":"ng-annotate","full_name":"olov/ng-annotate","owner":{"login":"olov","id":19247,"avatar_url":"https://avatars.githubusercontent.com/u/19247?v=3","gravatar_id":"","url":"https://api.github.com/users/olov","html_url":"https://github.com/olov","followers_url":"https://api.github.com/users/olov/followers","following_url":"https://api.github.com/users/olov/following{/other_user}","gists_url":"https://api.github.com/users/olov/gists{/gist_id}","starred_url":"https://api.github.com/users/olov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olov/subscriptions","organizations_url":"https://api.github.com/users/olov/orgs","repos_url":"https://api.github.com/users/olov/repos","events_url":"https://api.github.com/users/olov/events{/privacy}","received_events_url":"https://api.github.com/users/olov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/olov/ng-annotate","description":"Add, remove and rebuild AngularJS dependency injection annotations","fork":false,"url":"https://api.github.com/repos/olov/ng-annotate","forks_url":"https://api.github.com/repos/olov/ng-annotate/forks","keys_url":"https://api.github.com/repos/olov/ng-annotate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olov/ng-annotate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olov/ng-annotate/teams","hooks_url":"https://api.github.com/repos/olov/ng-annotate/hooks","issue_events_url":"https://api.github.com/repos/olov/ng-annotate/issues/events{/number}","events_url":"https://api.github.com/repos/olov/ng-annotate/events","assignees_url":"https://api.github.com/repos/olov/ng-annotate/assignees{/user}","branches_url":"https://api.github.com/repos/olov/ng-annotate/branches{/branch}","tags_url":"https://api.github.com/repos/olov/ng-annotate/tags","blobs_url":"https://api.github.com/repos/olov/ng-annotate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olov/ng-annotate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olov/ng-annotate/git/refs{/sha}","trees_url":"https://api.github.com/repos/olov/ng-annotate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olov/ng-annotate/statuses/{sha}","languages_url":"https://api.github.com/repos/olov/ng-annotate/languages","stargazers_url":"https://api.github.com/repos/olov/ng-annotate/stargazers","contributors_url":"https://api.github.com/repos/olov/ng-annotate/contributors","subscribers_url":"https://api.github.com/repos/olov/ng-annotate/subscribers","subscription_url":"https://api.github.com/repos/olov/ng-annotate/subscription","commits_url":"https://api.github.com/repos/olov/ng-annotate/commits{/sha}","git_commits_url":"https://api.github.com/repos/olov/ng-annotate/git/commits{/sha}","comments_url":"https://api.github.com/repos/olov/ng-annotate/comments{/number}","issue_comment_url":"https://api.github.com/repos/olov/ng-annotate/issues/comments{/number}","contents_url":"https://api.github.com/repos/olov/ng-annotate/contents/{+path}","compare_url":"https://api.github.com/repos/olov/ng-annotate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olov/ng-annotate/merges","archive_url":"https://api.github.com/repos/olov/ng-annotate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olov/ng-annotate/downloads","issues_url":"https://api.github.com/repos/olov/ng-annotate/issues{/number}","pulls_url":"https://api.github.com/repos/olov/ng-annotate/pulls{/number}","milestones_url":"https://api.github.com/repos/olov/ng-annotate/milestones{/number}","notifications_url":"https://api.github.com/repos/olov/ng-annotate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olov/ng-annotate/labels{/name}","releases_url":"https://api.github.com/repos/olov/ng-annotate/releases{/id}","created_at":"2013-09-03T09:52:01Z","updated_at":"2015-03-30T20:14:24Z","pushed_at":"2015-03-31T12:35:38Z","git_url":"git://github.com/olov/ng-annotate.git","ssh_url":"git@github.com:olov/ng-annotate.git","clone_url":"https://github.com/olov/ng-annotate.git","svn_url":"https://github.com/olov/ng-annotate","homepage":null,"size":1444,"stargazers_count":1089,"watchers_count":1089,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":10,"forks":42,"open_issues":10,"watchers":1089,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/olov/ng-annotate/pulls/154"},"html":{"href":"https://github.com/olov/ng-annotate/pull/154"},"issue":{"href":"https://api.github.com/repos/olov/ng-annotate/issues/154"},"comments":{"href":"https://api.github.com/repos/olov/ng-annotate/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/olov/ng-annotate/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/olov/ng-annotate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/olov/ng-annotate/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/olov/ng-annotate/statuses/fd3f4e9ee0232736ef687d374eb953981cac5204"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":15,"deletions":2,"changed_files":3}}