{"action":"created","issue":{"url":"https://api.github.com/repos/metarhia/common/issues/153","repository_url":"https://api.github.com/repos/metarhia/common","labels_url":"https://api.github.com/repos/metarhia/common/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/metarhia/common/issues/153/comments","events_url":"https://api.github.com/repos/metarhia/common/issues/153/events","html_url":"https://github.com/metarhia/common/pull/153","id":347923574,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2Mzk4NzY1","number":153,"title":"Refactor enum class","user":{"login":"lundibundi","id":9109612,"node_id":"MDQ6VXNlcjkxMDk2MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/9109612?v=4","gravatar_id":"","url":"https://api.github.com/users/lundibundi","html_url":"https://github.com/lundibundi","followers_url":"https://api.github.com/users/lundibundi/followers","following_url":"https://api.github.com/users/lundibundi/following{/other_user}","gists_url":"https://api.github.com/users/lundibundi/gists{/gist_id}","starred_url":"https://api.github.com/users/lundibundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lundibundi/subscriptions","organizations_url":"https://api.github.com/users/lundibundi/orgs","repos_url":"https://api.github.com/users/lundibundi/repos","events_url":"https://api.github.com/users/lundibundi/events{/privacy}","received_events_url":"https://api.github.com/users/lundibundi/received_events","type":"User","site_admin":false},"labels":[{"id":553170537,"node_id":"MDU6TGFiZWw1NTMxNzA1Mzc=","url":"https://api.github.com/repos/metarhia/common/labels/enhancement","name":"enhancement","color":"22cc22","default":true},{"id":560841147,"node_id":"MDU6TGFiZWw1NjA4NDExNDc=","url":"https://api.github.com/repos/metarhia/common/labels/optimization","name":"optimization","color":"008800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-08-06T13:27:24Z","updated_at":"2018-08-10T20:57:06Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/metarhia/common/pulls/153","html_url":"https://github.com/metarhia/common/pull/153","diff_url":"https://github.com/metarhia/common/pull/153.diff","patch_url":"https://github.com/metarhia/common/pull/153.patch"},"body":"* collection -> values\r\n* toPrimitive now only reports enum index and not key or value\r\n* cache enumArray into Map\r\n* return special values Enum.NaE upon creation of enum from\r\n  non-existent value\r\n* introduce static .from to get enum instance from a value\r\n* change enum properties: index - enum internal number, value - user\r\n  passed key, data - optional use passed data\r\n\r\nNeed input on toPrimitive change (don't understand why it was returning one or the other depending on type-hint) and `.from` method."},"comment":{"url":"https://api.github.com/repos/metarhia/common/issues/comments/412204236","html_url":"https://github.com/metarhia/common/pull/153#issuecomment-412204236","issue_url":"https://api.github.com/repos/metarhia/common/issues/153","id":412204236,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjIwNDIzNg==","user":{"login":"lundibundi","id":9109612,"node_id":"MDQ6VXNlcjkxMDk2MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/9109612?v=4","gravatar_id":"","url":"https://api.github.com/users/lundibundi","html_url":"https://github.com/lundibundi","followers_url":"https://api.github.com/users/lundibundi/followers","following_url":"https://api.github.com/users/lundibundi/following{/other_user}","gists_url":"https://api.github.com/users/lundibundi/gists{/gist_id}","starred_url":"https://api.github.com/users/lundibundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lundibundi/subscriptions","organizations_url":"https://api.github.com/users/lundibundi/orgs","repos_url":"https://api.github.com/users/lundibundi/repos","events_url":"https://api.github.com/users/lundibundi/events{/privacy}","received_events_url":"https://api.github.com/users/lundibundi/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T20:57:06Z","updated_at":"2018-08-10T20:57:06Z","author_association":"MEMBER","body":"@tshemsedinov because this one now has a different meaning. It's now an enum-with-data where\r\nJan - value\r\n'January' - data\r\nand there will be key (index) === 0 for Jan which is internal\r\nAnd you are able to get enum instances as EnumClass.from('Jan').\r\nTherefore 'Jan' is a user-name for this enum value but the actual value is an integer (index) stored inside.\r\n"}}
{"actor":{"display_login":"lundibundi"}}