{"action":"opened","number":53,"pull_request":{"url":"https://api.github.com/repos/andremm/typedlua/pulls/53","id":29952666,"html_url":"https://github.com/andremm/typedlua/pull/53","diff_url":"https://github.com/andremm/typedlua/pull/53.diff","patch_url":"https://github.com/andremm/typedlua/pull/53.patch","issue_url":"https://api.github.com/repos/andremm/typedlua/issues/53","number":53,"state":"open","locked":false,"title":"Only apply filter if type is found.","user":{"login":"hishamhm","id":245621,"avatar_url":"https://avatars.githubusercontent.com/u/245621?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamhm","html_url":"https://github.com/hishamhm","followers_url":"https://api.github.com/users/hishamhm/followers","following_url":"https://api.github.com/users/hishamhm/following{/other_user}","gists_url":"https://api.github.com/users/hishamhm/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamhm/subscriptions","organizations_url":"https://api.github.com/users/hishamhm/orgs","repos_url":"https://api.github.com/users/hishamhm/repos","events_url":"https://api.github.com/users/hishamhm/events{/privacy}","received_events_url":"https://api.github.com/users/hishamhm/received_events","type":"User","site_admin":false},"body":"I think this is a bugfix for #52. Please verify.\r\n\r\nThe only change in logic is adding if's after get_index.\r\n\r\nThe rest of the diff is there just because of changed\r\nvariable names.\r\n\r\nI had to add a local `var` to make sure that `l[name]` is\r\nupdated only if get_index succeeds.\r\n\r\nI also changed the variable names from i to idx because\r\nluacheck noted that it was shadowing the i variable from\r\nthe outer for loop. I thought this would make the code\r\neasier to read.","created_at":"2015-02-25T01:08:10Z","updated_at":"2015-02-25T01:08:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andremm/typedlua/pulls/53/commits","review_comments_url":"https://api.github.com/repos/andremm/typedlua/pulls/53/comments","review_comment_url":"https://api.github.com/repos/andremm/typedlua/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andremm/typedlua/issues/53/comments","statuses_url":"https://api.github.com/repos/andremm/typedlua/statuses/e57648c0d07d8671356285858035f30668b89579","head":{"label":"hishamhm:if-idx","ref":"if-idx","sha":"e57648c0d07d8671356285858035f30668b89579","user":{"login":"hishamhm","id":245621,"avatar_url":"https://avatars.githubusercontent.com/u/245621?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamhm","html_url":"https://github.com/hishamhm","followers_url":"https://api.github.com/users/hishamhm/followers","following_url":"https://api.github.com/users/hishamhm/following{/other_user}","gists_url":"https://api.github.com/users/hishamhm/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamhm/subscriptions","organizations_url":"https://api.github.com/users/hishamhm/orgs","repos_url":"https://api.github.com/users/hishamhm/repos","events_url":"https://api.github.com/users/hishamhm/events{/privacy}","received_events_url":"https://api.github.com/users/hishamhm/received_events","type":"User","site_admin":false},"repo":{"id":30853202,"name":"typedlua","full_name":"hishamhm/typedlua","owner":{"login":"hishamhm","id":245621,"avatar_url":"https://avatars.githubusercontent.com/u/245621?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamhm","html_url":"https://github.com/hishamhm","followers_url":"https://api.github.com/users/hishamhm/followers","following_url":"https://api.github.com/users/hishamhm/following{/other_user}","gists_url":"https://api.github.com/users/hishamhm/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamhm/subscriptions","organizations_url":"https://api.github.com/users/hishamhm/orgs","repos_url":"https://api.github.com/users/hishamhm/repos","events_url":"https://api.github.com/users/hishamhm/events{/privacy}","received_events_url":"https://api.github.com/users/hishamhm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hishamhm/typedlua","description":"An Optional Type System for Lua","fork":true,"url":"https://api.github.com/repos/hishamhm/typedlua","forks_url":"https://api.github.com/repos/hishamhm/typedlua/forks","keys_url":"https://api.github.com/repos/hishamhm/typedlua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hishamhm/typedlua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hishamhm/typedlua/teams","hooks_url":"https://api.github.com/repos/hishamhm/typedlua/hooks","issue_events_url":"https://api.github.com/repos/hishamhm/typedlua/issues/events{/number}","events_url":"https://api.github.com/repos/hishamhm/typedlua/events","assignees_url":"https://api.github.com/repos/hishamhm/typedlua/assignees{/user}","branches_url":"https://api.github.com/repos/hishamhm/typedlua/branches{/branch}","tags_url":"https://api.github.com/repos/hishamhm/typedlua/tags","blobs_url":"https://api.github.com/repos/hishamhm/typedlua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hishamhm/typedlua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hishamhm/typedlua/git/refs{/sha}","trees_url":"https://api.github.com/repos/hishamhm/typedlua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hishamhm/typedlua/statuses/{sha}","languages_url":"https://api.github.com/repos/hishamhm/typedlua/languages","stargazers_url":"https://api.github.com/repos/hishamhm/typedlua/stargazers","contributors_url":"https://api.github.com/repos/hishamhm/typedlua/contributors","subscribers_url":"https://api.github.com/repos/hishamhm/typedlua/subscribers","subscription_url":"https://api.github.com/repos/hishamhm/typedlua/subscription","commits_url":"https://api.github.com/repos/hishamhm/typedlua/commits{/sha}","git_commits_url":"https://api.github.com/repos/hishamhm/typedlua/git/commits{/sha}","comments_url":"https://api.github.com/repos/hishamhm/typedlua/comments{/number}","issue_comment_url":"https://api.github.com/repos/hishamhm/typedlua/issues/comments{/number}","contents_url":"https://api.github.com/repos/hishamhm/typedlua/contents/{+path}","compare_url":"https://api.github.com/repos/hishamhm/typedlua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hishamhm/typedlua/merges","archive_url":"https://api.github.com/repos/hishamhm/typedlua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hishamhm/typedlua/downloads","issues_url":"https://api.github.com/repos/hishamhm/typedlua/issues{/number}","pulls_url":"https://api.github.com/repos/hishamhm/typedlua/pulls{/number}","milestones_url":"https://api.github.com/repos/hishamhm/typedlua/milestones{/number}","notifications_url":"https://api.github.com/repos/hishamhm/typedlua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hishamhm/typedlua/labels{/name}","releases_url":"https://api.github.com/repos/hishamhm/typedlua/releases{/id}","created_at":"2015-02-16T03:58:53Z","updated_at":"2015-02-20T02:38:57Z","pushed_at":"2015-02-25T01:07:10Z","git_url":"git://github.com/hishamhm/typedlua.git","ssh_url":"git@github.com:hishamhm/typedlua.git","clone_url":"https://github.com/hishamhm/typedlua.git","svn_url":"https://github.com/hishamhm/typedlua","homepage":"","size":4684,"stargazers_count":0,"watchers_count":0,"language":"Lua","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":"andremm:master","ref":"master","sha":"78b0e6778950efc60d14fd15916ad142a9d16564","user":{"login":"andremm","id":3384432,"avatar_url":"https://avatars.githubusercontent.com/u/3384432?v=3","gravatar_id":"","url":"https://api.github.com/users/andremm","html_url":"https://github.com/andremm","followers_url":"https://api.github.com/users/andremm/followers","following_url":"https://api.github.com/users/andremm/following{/other_user}","gists_url":"https://api.github.com/users/andremm/gists{/gist_id}","starred_url":"https://api.github.com/users/andremm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremm/subscriptions","organizations_url":"https://api.github.com/users/andremm/orgs","repos_url":"https://api.github.com/users/andremm/repos","events_url":"https://api.github.com/users/andremm/events{/privacy}","received_events_url":"https://api.github.com/users/andremm/received_events","type":"User","site_admin":false},"repo":{"id":10320933,"name":"typedlua","full_name":"andremm/typedlua","owner":{"login":"andremm","id":3384432,"avatar_url":"https://avatars.githubusercontent.com/u/3384432?v=3","gravatar_id":"","url":"https://api.github.com/users/andremm","html_url":"https://github.com/andremm","followers_url":"https://api.github.com/users/andremm/followers","following_url":"https://api.github.com/users/andremm/following{/other_user}","gists_url":"https://api.github.com/users/andremm/gists{/gist_id}","starred_url":"https://api.github.com/users/andremm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremm/subscriptions","organizations_url":"https://api.github.com/users/andremm/orgs","repos_url":"https://api.github.com/users/andremm/repos","events_url":"https://api.github.com/users/andremm/events{/privacy}","received_events_url":"https://api.github.com/users/andremm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andremm/typedlua","description":"An Optional Type System for Lua","fork":false,"url":"https://api.github.com/repos/andremm/typedlua","forks_url":"https://api.github.com/repos/andremm/typedlua/forks","keys_url":"https://api.github.com/repos/andremm/typedlua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andremm/typedlua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andremm/typedlua/teams","hooks_url":"https://api.github.com/repos/andremm/typedlua/hooks","issue_events_url":"https://api.github.com/repos/andremm/typedlua/issues/events{/number}","events_url":"https://api.github.com/repos/andremm/typedlua/events","assignees_url":"https://api.github.com/repos/andremm/typedlua/assignees{/user}","branches_url":"https://api.github.com/repos/andremm/typedlua/branches{/branch}","tags_url":"https://api.github.com/repos/andremm/typedlua/tags","blobs_url":"https://api.github.com/repos/andremm/typedlua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andremm/typedlua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andremm/typedlua/git/refs{/sha}","trees_url":"https://api.github.com/repos/andremm/typedlua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andremm/typedlua/statuses/{sha}","languages_url":"https://api.github.com/repos/andremm/typedlua/languages","stargazers_url":"https://api.github.com/repos/andremm/typedlua/stargazers","contributors_url":"https://api.github.com/repos/andremm/typedlua/contributors","subscribers_url":"https://api.github.com/repos/andremm/typedlua/subscribers","subscription_url":"https://api.github.com/repos/andremm/typedlua/subscription","commits_url":"https://api.github.com/repos/andremm/typedlua/commits{/sha}","git_commits_url":"https://api.github.com/repos/andremm/typedlua/git/commits{/sha}","comments_url":"https://api.github.com/repos/andremm/typedlua/comments{/number}","issue_comment_url":"https://api.github.com/repos/andremm/typedlua/issues/comments{/number}","contents_url":"https://api.github.com/repos/andremm/typedlua/contents/{+path}","compare_url":"https://api.github.com/repos/andremm/typedlua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andremm/typedlua/merges","archive_url":"https://api.github.com/repos/andremm/typedlua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andremm/typedlua/downloads","issues_url":"https://api.github.com/repos/andremm/typedlua/issues{/number}","pulls_url":"https://api.github.com/repos/andremm/typedlua/pulls{/number}","milestones_url":"https://api.github.com/repos/andremm/typedlua/milestones{/number}","notifications_url":"https://api.github.com/repos/andremm/typedlua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andremm/typedlua/labels{/name}","releases_url":"https://api.github.com/repos/andremm/typedlua/releases{/id}","created_at":"2013-05-27T19:11:05Z","updated_at":"2015-02-23T12:22:47Z","pushed_at":"2015-02-23T12:22:45Z","git_url":"git://github.com/andremm/typedlua.git","ssh_url":"git@github.com:andremm/typedlua.git","clone_url":"https://github.com/andremm/typedlua.git","svn_url":"https://github.com/andremm/typedlua","homepage":"","size":6703,"stargazers_count":123,"watchers_count":123,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":17,"forks":22,"open_issues":17,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andremm/typedlua/pulls/53"},"html":{"href":"https://github.com/andremm/typedlua/pull/53"},"issue":{"href":"https://api.github.com/repos/andremm/typedlua/issues/53"},"comments":{"href":"https://api.github.com/repos/andremm/typedlua/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/andremm/typedlua/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/andremm/typedlua/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andremm/typedlua/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/andremm/typedlua/statuses/e57648c0d07d8671356285858035f30668b89579"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":54,"deletions":38,"changed_files":1}}