{"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/AngelList/protip/pulls/3","id":42935326,"html_url":"https://github.com/AngelList/protip/pull/3","diff_url":"https://github.com/AngelList/protip/pull/3.diff","patch_url":"https://github.com/AngelList/protip/pull/3.patch","issue_url":"https://api.github.com/repos/AngelList/protip/issues/3","number":3,"state":"open","locked":false,"title":"Enum queries","user":{"login":"kmontag","id":388637,"avatar_url":"https://avatars.githubusercontent.com/u/388637?v=3","gravatar_id":"","url":"https://api.github.com/users/kmontag","html_url":"https://github.com/kmontag","followers_url":"https://api.github.com/users/kmontag/followers","following_url":"https://api.github.com/users/kmontag/following{/other_user}","gists_url":"https://api.github.com/users/kmontag/gists{/gist_id}","starred_url":"https://api.github.com/users/kmontag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmontag/subscriptions","organizations_url":"https://api.github.com/users/kmontag/orgs","repos_url":"https://api.github.com/users/kmontag/repos","events_url":"https://api.github.com/users/kmontag/events{/privacy}","received_events_url":"https://api.github.com/users/kmontag/received_events","type":"User","site_admin":false},"body":"Adds query methods for enums to wrappers and resources, so wrapping a message like:\r\n\r\n```\r\nmessage Foo {\r\n  enum Bar {\r\n    BAZ = 0;\r\n    QUX = 1;\r\n  }\r\n  Bar bar = 1;\r\n}\r\n```\r\n\r\nwould allow calls like:\r\n\r\n```ruby\r\nwrapper = Protip::Wrapper.new(Foo::Bar.new, converter)\r\nwrapper.bar?(:BAZ) # => true\r\nwrapper.bar?(:QUX) # => false\r\nwrapper.bar?(:QUUX) # => raises RangeError\r\n```","created_at":"2015-08-20T14:27:24Z","updated_at":"2015-08-20T14:27:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AngelList/protip/pulls/3/commits","review_comments_url":"https://api.github.com/repos/AngelList/protip/pulls/3/comments","review_comment_url":"https://api.github.com/repos/AngelList/protip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AngelList/protip/issues/3/comments","statuses_url":"https://api.github.com/repos/AngelList/protip/statuses/362b1c64638ee2ce417d7fa74d0c1487a918adbf","head":{"label":"AngelList:enum-queries","ref":"enum-queries","sha":"362b1c64638ee2ce417d7fa74d0c1487a918adbf","user":{"login":"AngelList","id":12423984,"avatar_url":"https://avatars.githubusercontent.com/u/12423984?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelList","html_url":"https://github.com/AngelList","followers_url":"https://api.github.com/users/AngelList/followers","following_url":"https://api.github.com/users/AngelList/following{/other_user}","gists_url":"https://api.github.com/users/AngelList/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelList/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelList/subscriptions","organizations_url":"https://api.github.com/users/AngelList/orgs","repos_url":"https://api.github.com/users/AngelList/repos","events_url":"https://api.github.com/users/AngelList/events{/privacy}","received_events_url":"https://api.github.com/users/AngelList/received_events","type":"Organization","site_admin":false},"repo":{"id":35532735,"name":"protip","full_name":"AngelList/protip","owner":{"login":"AngelList","id":12423984,"avatar_url":"https://avatars.githubusercontent.com/u/12423984?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelList","html_url":"https://github.com/AngelList","followers_url":"https://api.github.com/users/AngelList/followers","following_url":"https://api.github.com/users/AngelList/following{/other_user}","gists_url":"https://api.github.com/users/AngelList/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelList/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelList/subscriptions","organizations_url":"https://api.github.com/users/AngelList/orgs","repos_url":"https://api.github.com/users/AngelList/repos","events_url":"https://api.github.com/users/AngelList/events{/privacy}","received_events_url":"https://api.github.com/users/AngelList/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AngelList/protip","description":"Resources backed by protobuf messages","fork":false,"url":"https://api.github.com/repos/AngelList/protip","forks_url":"https://api.github.com/repos/AngelList/protip/forks","keys_url":"https://api.github.com/repos/AngelList/protip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AngelList/protip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AngelList/protip/teams","hooks_url":"https://api.github.com/repos/AngelList/protip/hooks","issue_events_url":"https://api.github.com/repos/AngelList/protip/issues/events{/number}","events_url":"https://api.github.com/repos/AngelList/protip/events","assignees_url":"https://api.github.com/repos/AngelList/protip/assignees{/user}","branches_url":"https://api.github.com/repos/AngelList/protip/branches{/branch}","tags_url":"https://api.github.com/repos/AngelList/protip/tags","blobs_url":"https://api.github.com/repos/AngelList/protip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AngelList/protip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AngelList/protip/git/refs{/sha}","trees_url":"https://api.github.com/repos/AngelList/protip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AngelList/protip/statuses/{sha}","languages_url":"https://api.github.com/repos/AngelList/protip/languages","stargazers_url":"https://api.github.com/repos/AngelList/protip/stargazers","contributors_url":"https://api.github.com/repos/AngelList/protip/contributors","subscribers_url":"https://api.github.com/repos/AngelList/protip/subscribers","subscription_url":"https://api.github.com/repos/AngelList/protip/subscription","commits_url":"https://api.github.com/repos/AngelList/protip/commits{/sha}","git_commits_url":"https://api.github.com/repos/AngelList/protip/git/commits{/sha}","comments_url":"https://api.github.com/repos/AngelList/protip/comments{/number}","issue_comment_url":"https://api.github.com/repos/AngelList/protip/issues/comments{/number}","contents_url":"https://api.github.com/repos/AngelList/protip/contents/{+path}","compare_url":"https://api.github.com/repos/AngelList/protip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AngelList/protip/merges","archive_url":"https://api.github.com/repos/AngelList/protip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AngelList/protip/downloads","issues_url":"https://api.github.com/repos/AngelList/protip/issues{/number}","pulls_url":"https://api.github.com/repos/AngelList/protip/pulls{/number}","milestones_url":"https://api.github.com/repos/AngelList/protip/milestones{/number}","notifications_url":"https://api.github.com/repos/AngelList/protip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AngelList/protip/labels{/name}","releases_url":"https://api.github.com/repos/AngelList/protip/releases{/id}","created_at":"2015-05-13T06:44:19Z","updated_at":"2015-05-18T18:36:00Z","pushed_at":"2015-08-20T14:24:04Z","git_url":"git://github.com/AngelList/protip.git","ssh_url":"git@github.com:AngelList/protip.git","clone_url":"https://github.com/AngelList/protip.git","svn_url":"https://github.com/AngelList/protip","homepage":"https://angel.co","size":257,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"AngelList:master","ref":"master","sha":"9462de41e3307e8f80ecff10eb412b2c2ecbc0ad","user":{"login":"AngelList","id":12423984,"avatar_url":"https://avatars.githubusercontent.com/u/12423984?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelList","html_url":"https://github.com/AngelList","followers_url":"https://api.github.com/users/AngelList/followers","following_url":"https://api.github.com/users/AngelList/following{/other_user}","gists_url":"https://api.github.com/users/AngelList/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelList/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelList/subscriptions","organizations_url":"https://api.github.com/users/AngelList/orgs","repos_url":"https://api.github.com/users/AngelList/repos","events_url":"https://api.github.com/users/AngelList/events{/privacy}","received_events_url":"https://api.github.com/users/AngelList/received_events","type":"Organization","site_admin":false},"repo":{"id":35532735,"name":"protip","full_name":"AngelList/protip","owner":{"login":"AngelList","id":12423984,"avatar_url":"https://avatars.githubusercontent.com/u/12423984?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelList","html_url":"https://github.com/AngelList","followers_url":"https://api.github.com/users/AngelList/followers","following_url":"https://api.github.com/users/AngelList/following{/other_user}","gists_url":"https://api.github.com/users/AngelList/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelList/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelList/subscriptions","organizations_url":"https://api.github.com/users/AngelList/orgs","repos_url":"https://api.github.com/users/AngelList/repos","events_url":"https://api.github.com/users/AngelList/events{/privacy}","received_events_url":"https://api.github.com/users/AngelList/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AngelList/protip","description":"Resources backed by protobuf messages","fork":false,"url":"https://api.github.com/repos/AngelList/protip","forks_url":"https://api.github.com/repos/AngelList/protip/forks","keys_url":"https://api.github.com/repos/AngelList/protip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AngelList/protip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AngelList/protip/teams","hooks_url":"https://api.github.com/repos/AngelList/protip/hooks","issue_events_url":"https://api.github.com/repos/AngelList/protip/issues/events{/number}","events_url":"https://api.github.com/repos/AngelList/protip/events","assignees_url":"https://api.github.com/repos/AngelList/protip/assignees{/user}","branches_url":"https://api.github.com/repos/AngelList/protip/branches{/branch}","tags_url":"https://api.github.com/repos/AngelList/protip/tags","blobs_url":"https://api.github.com/repos/AngelList/protip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AngelList/protip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AngelList/protip/git/refs{/sha}","trees_url":"https://api.github.com/repos/AngelList/protip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AngelList/protip/statuses/{sha}","languages_url":"https://api.github.com/repos/AngelList/protip/languages","stargazers_url":"https://api.github.com/repos/AngelList/protip/stargazers","contributors_url":"https://api.github.com/repos/AngelList/protip/contributors","subscribers_url":"https://api.github.com/repos/AngelList/protip/subscribers","subscription_url":"https://api.github.com/repos/AngelList/protip/subscription","commits_url":"https://api.github.com/repos/AngelList/protip/commits{/sha}","git_commits_url":"https://api.github.com/repos/AngelList/protip/git/commits{/sha}","comments_url":"https://api.github.com/repos/AngelList/protip/comments{/number}","issue_comment_url":"https://api.github.com/repos/AngelList/protip/issues/comments{/number}","contents_url":"https://api.github.com/repos/AngelList/protip/contents/{+path}","compare_url":"https://api.github.com/repos/AngelList/protip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AngelList/protip/merges","archive_url":"https://api.github.com/repos/AngelList/protip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AngelList/protip/downloads","issues_url":"https://api.github.com/repos/AngelList/protip/issues{/number}","pulls_url":"https://api.github.com/repos/AngelList/protip/pulls{/number}","milestones_url":"https://api.github.com/repos/AngelList/protip/milestones{/number}","notifications_url":"https://api.github.com/repos/AngelList/protip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AngelList/protip/labels{/name}","releases_url":"https://api.github.com/repos/AngelList/protip/releases{/id}","created_at":"2015-05-13T06:44:19Z","updated_at":"2015-05-18T18:36:00Z","pushed_at":"2015-08-20T14:24:04Z","git_url":"git://github.com/AngelList/protip.git","ssh_url":"git@github.com:AngelList/protip.git","clone_url":"https://github.com/AngelList/protip.git","svn_url":"https://github.com/AngelList/protip","homepage":"https://angel.co","size":257,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AngelList/protip/pulls/3"},"html":{"href":"https://github.com/AngelList/protip/pull/3"},"issue":{"href":"https://api.github.com/repos/AngelList/protip/issues/3"},"comments":{"href":"https://api.github.com/repos/AngelList/protip/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/AngelList/protip/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/AngelList/protip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AngelList/protip/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/AngelList/protip/statuses/362b1c64638ee2ce417d7fa74d0c1487a918adbf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":152,"deletions":6,"changed_files":5}}