{"action":"opened","issue":{"url":"https://api.github.com/repos/zalora/myrapi/issues/7","labels_url":"https://api.github.com/repos/zalora/myrapi/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/zalora/myrapi/issues/7/comments","events_url":"https://api.github.com/repos/zalora/myrapi/issues/7/events","html_url":"https://github.com/zalora/myrapi/issues/7","id":65124425,"number":7,"title":"smart-create","user":{"login":"phunehehe","id":627831,"avatar_url":"https://avatars.githubusercontent.com/u/627831?v=3","gravatar_id":"","url":"https://api.github.com/users/phunehehe","html_url":"https://github.com/phunehehe","followers_url":"https://api.github.com/users/phunehehe/followers","following_url":"https://api.github.com/users/phunehehe/following{/other_user}","gists_url":"https://api.github.com/users/phunehehe/gists{/gist_id}","starred_url":"https://api.github.com/users/phunehehe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phunehehe/subscriptions","organizations_url":"https://api.github.com/users/phunehehe/orgs","repos_url":"https://api.github.com/users/phunehehe/repos","events_url":"https://api.github.com/users/phunehehe/events{/privacy}","received_events_url":"https://api.github.com/users/phunehehe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-30T03:00:37Z","updated_at":"2015-03-30T03:00:37Z","closed_at":null,"body":"(Follow up from #4)\r\n\r\nI think this will be a good interface for `smart-create`:\r\n\r\n```bash\r\nmyrapi smart-create --subdomain abc.example.com --type CNAME --ttl 300 \\\r\n    --values \"abc1.example.com abc2.example.com abc3.example.com\"\r\n```\r\n\r\nFor each value, the command should check if a matching record exists (based on subdomain and value) and call `create` or `update` accordingly.\r\n\r\nAfter everything is done, the command should check the number of records for that subdomain versus the number of values given, and emits a warning if they don't match."}}