{"action":"opened","issue":{"url":"https://api.github.com/repos/devinmatte/wasp/issues/24","repository_url":"https://api.github.com/repos/devinmatte/wasp","labels_url":"https://api.github.com/repos/devinmatte/wasp/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/devinmatte/wasp/issues/24/comments","events_url":"https://api.github.com/repos/devinmatte/wasp/issues/24/events","html_url":"https://github.com/devinmatte/wasp/issues/24","id":257741309,"number":24,"title":"Stop repeating the color request code","user":{"login":"tuantr10","id":5449409,"avatar_url":"https://avatars2.githubusercontent.com/u/5449409?v=4","gravatar_id":"","url":"https://api.github.com/users/tuantr10","html_url":"https://github.com/tuantr10","followers_url":"https://api.github.com/users/tuantr10/followers","following_url":"https://api.github.com/users/tuantr10/following{/other_user}","gists_url":"https://api.github.com/users/tuantr10/gists{/gist_id}","starred_url":"https://api.github.com/users/tuantr10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuantr10/subscriptions","organizations_url":"https://api.github.com/users/tuantr10/orgs","repos_url":"https://api.github.com/users/tuantr10/repos","events_url":"https://api.github.com/users/tuantr10/events{/privacy}","received_events_url":"https://api.github.com/users/tuantr10/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-14T14:31:19Z","updated_at":"2017-09-14T14:31:19Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"For now the `theme_color` and `background_color` function have almost the same code, we can refactor and put those code into one global function. Something like this:\r\n```\r\ndef request_color(color_type):\r\n    ...#repeated code\r\n    return ...\r\n\r\nclass Manifest:\r\n    def theme_color(self):\r\n        self.details['theme_color'] = request_color('theme_color')\r\n\r\n    def background_color(self):\r\n        self.details['background_color'] = request_color('background_color')\r\n```\r\nWhat do you think @devinmatte?"}}
{"actor":{"display_login":"tuantr10"}}