{"action":"created","issue":{"url":"https://api.github.com/repos/desktop/desktop/issues/6294","repository_url":"https://api.github.com/repos/desktop/desktop","labels_url":"https://api.github.com/repos/desktop/desktop/issues/6294/labels{/name}","comments_url":"https://api.github.com/repos/desktop/desktop/issues/6294/comments","events_url":"https://api.github.com/repos/desktop/desktop/issues/6294/events","html_url":"https://github.com/desktop/desktop/issues/6294","id":384632754,"node_id":"MDU6SXNzdWUzODQ2MzI3NTQ=","number":6294,"title":"Check for existing README prior to creation","user":{"login":"joshhopkins","id":11452674,"node_id":"MDQ6VXNlcjExNDUyNjc0","avatar_url":"https://avatars1.githubusercontent.com/u/11452674?v=4","gravatar_id":"","url":"https://api.github.com/users/joshhopkins","html_url":"https://github.com/joshhopkins","followers_url":"https://api.github.com/users/joshhopkins/followers","following_url":"https://api.github.com/users/joshhopkins/following{/other_user}","gists_url":"https://api.github.com/users/joshhopkins/gists{/gist_id}","starred_url":"https://api.github.com/users/joshhopkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshhopkins/subscriptions","organizations_url":"https://api.github.com/users/joshhopkins/orgs","repos_url":"https://api.github.com/users/joshhopkins/repos","events_url":"https://api.github.com/users/joshhopkins/events{/privacy}","received_events_url":"https://api.github.com/users/joshhopkins/received_events","type":"User","site_admin":false},"labels":[{"id":596683827,"node_id":"MDU6TGFiZWw1OTY2ODM4Mjc=","url":"https://api.github.com/repos/desktop/desktop/labels/more-information-needed","name":"more-information-needed","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-27T05:41:09Z","updated_at":"2018-11-28T18:16:11Z","closed_at":null,"author_association":"NONE","body":"When adding an existing local project, choosing to create a new repository, the UI displays an option to `Initialise this repository with a README`.\r\n\r\nThis option was selected by default and in a tired state I selected 'create'. This completely wiped the README.MD file I had spent an hour writing and there doesn't seem to be a way of recovering this.\r\n\r\n**Potential solution**\r\n\r\nCheck for existing README.MD file and prompt user if one exists."},"comment":{"url":"https://api.github.com/repos/desktop/desktop/issues/comments/442550080","html_url":"https://github.com/desktop/desktop/issues/6294#issuecomment-442550080","issue_url":"https://api.github.com/repos/desktop/desktop/issues/6294","id":442550080,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjU1MDA4MA==","user":{"login":"Daniel-McCarthy","id":4957200,"node_id":"MDQ6VXNlcjQ5NTcyMDA=","avatar_url":"https://avatars0.githubusercontent.com/u/4957200?v=4","gravatar_id":"","url":"https://api.github.com/users/Daniel-McCarthy","html_url":"https://github.com/Daniel-McCarthy","followers_url":"https://api.github.com/users/Daniel-McCarthy/followers","following_url":"https://api.github.com/users/Daniel-McCarthy/following{/other_user}","gists_url":"https://api.github.com/users/Daniel-McCarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/Daniel-McCarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daniel-McCarthy/subscriptions","organizations_url":"https://api.github.com/users/Daniel-McCarthy/orgs","repos_url":"https://api.github.com/users/Daniel-McCarthy/repos","events_url":"https://api.github.com/users/Daniel-McCarthy/events{/privacy}","received_events_url":"https://api.github.com/users/Daniel-McCarthy/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T18:16:11Z","updated_at":"2018-11-28T18:16:11Z","author_association":"MEMBER","body":"@outofambit Great! In regards to checking for multiple possible names, regular expressions would be a great way to check for a match regardless of the capitalization combinations, as well as with/without the inclusion of the `.md` extension\r\n\r\nOtherwise, if we didn't want to use regular expressions for this, setting the string we are checking `.toLowerCase()` could limit the need to check for lots of variations and leave it to only `readme.md` and `readme`."}}
{"actor":{"display_login":"Daniel-McCarthy"}}