{"action":"created","comment":{"url":"https://api.github.com/repos/desktop/desktop/pulls/comments/213014421","pull_request_review_id":149759416,"id":213014421,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzAxNDQyMQ==","diff_hunk":"@@ -52,6 +52,32 @@ export async function getTopLevelWorkingDirectory(\n   return Path.resolve(path, relativePath)\n }\n \n+export async function checkIfRepositoryIsBare(\n+  path: string\n+): Promise<boolean | null> {\n+  let result\n+\n+  try {\n+    result = await git(\n+      ['rev-parse', '--is-bare-repository'],\n+      path,\n+      'checkIfRepositoryIsBare'","path":"app/src/lib/git/rev-parse.ts","position":13,"original_position":13,"commit_id":"4185b0df0375bdd038b44a7e8015feca3973c005","original_commit_id":"7c47d969c56fcedac1af35937b3ca6cc9d906309","user":{"login":"shiftkey","id":359239,"node_id":"MDQ6VXNlcjM1OTIzOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/359239?v=4","gravatar_id":"","url":"https://api.github.com/users/shiftkey","html_url":"https://github.com/shiftkey","followers_url":"https://api.github.com/users/shiftkey/followers","following_url":"https://api.github.com/users/shiftkey/following{/other_user}","gists_url":"https://api.github.com/users/shiftkey/gists{/gist_id}","starred_url":"https://api.github.com/users/shiftkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiftkey/subscriptions","organizations_url":"https://api.github.com/users/shiftkey/orgs","repos_url":"https://api.github.com/users/shiftkey/repos","events_url":"https://api.github.com/users/shiftkey/events{/privacy}","received_events_url":"https://api.github.com/users/shiftkey/received_events","type":"User","site_admin":true},"body":":art: this should match the function being called","created_at":"2018-08-27T15:23:31Z","updated_at":"2018-08-27T15:44:33Z","html_url":"https://github.com/desktop/desktop/pull/5434#discussion_r213014421","pull_request_url":"https://api.github.com/repos/desktop/desktop/pulls/5434","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/desktop/desktop/pulls/comments/213014421"},"html":{"href":"https://github.com/desktop/desktop/pull/5434#discussion_r213014421"},"pull_request":{"href":"https://api.github.com/repos/desktop/desktop/pulls/5434"}}},"pull_request":{"url":"https://api.github.com/repos/desktop/desktop/pulls/5434","id":209330520,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzMwNTIw","html_url":"https://github.com/desktop/desktop/pull/5434","diff_url":"https://github.com/desktop/desktop/pull/5434.diff","patch_url":"https://github.com/desktop/desktop/pull/5434.patch","issue_url":"https://api.github.com/repos/desktop/desktop/issues/5434","number":5434,"state":"open","locked":false,"title":"Start blocking the ability to add local bare repositories","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},"body":"This pull request is in response to Issue #4293. The intention is to stop allowing bare repositories from being added via GitHub Desktop as they are not currently supported. To do so, a function that checks if the repository is bare has been added. Additionally, the Add-Existing-Repository dialogue now uses the added function to check for a bare repository and displays a warning and disables the add button.\r\n\r\nI am still new to this project and a number of the technologies involved in it so there is likely plenty room for improvement. I am more than happy to make changes to my implementation. I suspect it can be simplified, especially where it deals with `boolean | null` types.\r\n","created_at":"2018-08-18T21:04:01Z","updated_at":"2018-08-27T15:44:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8be1b329118a60804257a52174273696274e5ffd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/desktop/desktop/pulls/5434/commits","review_comments_url":"https://api.github.com/repos/desktop/desktop/pulls/5434/comments","review_comment_url":"https://api.github.com/repos/desktop/desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/desktop/desktop/issues/5434/comments","statuses_url":"https://api.github.com/repos/desktop/desktop/statuses/4185b0df0375bdd038b44a7e8015feca3973c005","head":{"label":"Daniel-McCarthy:Block-Adding-Local-Bare-Repositories","ref":"Block-Adding-Local-Bare-Repositories","sha":"4185b0df0375bdd038b44a7e8015feca3973c005","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},"repo":{"id":143821594,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4MjE1OTQ=","name":"desktop","full_name":"Daniel-McCarthy/desktop","owner":{"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},"private":false,"html_url":"https://github.com/Daniel-McCarthy/desktop","description":"Simple collaboration from your desktop","fork":true,"url":"https://api.github.com/repos/Daniel-McCarthy/desktop","forks_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/forks","keys_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/teams","hooks_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/hooks","issue_events_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/issues/events{/number}","events_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/events","assignees_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/assignees{/user}","branches_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/branches{/branch}","tags_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/tags","blobs_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/languages","stargazers_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/stargazers","contributors_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/contributors","subscribers_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/subscribers","subscription_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/subscription","commits_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/contents/{+path}","compare_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/merges","archive_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/downloads","issues_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/issues{/number}","pulls_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/labels{/name}","releases_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/releases{/id}","deployments_url":"https://api.github.com/repos/Daniel-McCarthy/desktop/deployments","created_at":"2018-08-07T04:54:53Z","updated_at":"2018-08-19T22:02:15Z","pushed_at":"2018-08-27T15:40:46Z","git_url":"git://github.com/Daniel-McCarthy/desktop.git","ssh_url":"git@github.com:Daniel-McCarthy/desktop.git","clone_url":"https://github.com/Daniel-McCarthy/desktop.git","svn_url":"https://github.com/Daniel-McCarthy/desktop","homepage":"https://desktop.github.com","size":139965,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"desktop:master","ref":"master","sha":"82db84f31ca4976d8eeddbc2ce8204b51fa4bca5","user":{"login":"desktop","id":13171334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTcxMzM0","avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"repo":{"id":58559694,"node_id":"MDEwOlJlcG9zaXRvcnk1ODU1OTY5NA==","name":"desktop","full_name":"desktop/desktop","owner":{"login":"desktop","id":13171334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTcxMzM0","avatar_url":"https://avatars0.githubusercontent.com/u/13171334?v=4","gravatar_id":"","url":"https://api.github.com/users/desktop","html_url":"https://github.com/desktop","followers_url":"https://api.github.com/users/desktop/followers","following_url":"https://api.github.com/users/desktop/following{/other_user}","gists_url":"https://api.github.com/users/desktop/gists{/gist_id}","starred_url":"https://api.github.com/users/desktop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desktop/subscriptions","organizations_url":"https://api.github.com/users/desktop/orgs","repos_url":"https://api.github.com/users/desktop/repos","events_url":"https://api.github.com/users/desktop/events{/privacy}","received_events_url":"https://api.github.com/users/desktop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/desktop/desktop","description":"Simple collaboration from your desktop","fork":false,"url":"https://api.github.com/repos/desktop/desktop","forks_url":"https://api.github.com/repos/desktop/desktop/forks","keys_url":"https://api.github.com/repos/desktop/desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/desktop/desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/desktop/desktop/teams","hooks_url":"https://api.github.com/repos/desktop/desktop/hooks","issue_events_url":"https://api.github.com/repos/desktop/desktop/issues/events{/number}","events_url":"https://api.github.com/repos/desktop/desktop/events","assignees_url":"https://api.github.com/repos/desktop/desktop/assignees{/user}","branches_url":"https://api.github.com/repos/desktop/desktop/branches{/branch}","tags_url":"https://api.github.com/repos/desktop/desktop/tags","blobs_url":"https://api.github.com/repos/desktop/desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/desktop/desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/desktop/desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/desktop/desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/desktop/desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/desktop/desktop/languages","stargazers_url":"https://api.github.com/repos/desktop/desktop/stargazers","contributors_url":"https://api.github.com/repos/desktop/desktop/contributors","subscribers_url":"https://api.github.com/repos/desktop/desktop/subscribers","subscription_url":"https://api.github.com/repos/desktop/desktop/subscription","commits_url":"https://api.github.com/repos/desktop/desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/desktop/desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/desktop/desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/desktop/desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/desktop/desktop/contents/{+path}","compare_url":"https://api.github.com/repos/desktop/desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/desktop/desktop/merges","archive_url":"https://api.github.com/repos/desktop/desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/desktop/desktop/downloads","issues_url":"https://api.github.com/repos/desktop/desktop/issues{/number}","pulls_url":"https://api.github.com/repos/desktop/desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/desktop/desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/desktop/desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/desktop/desktop/labels{/name}","releases_url":"https://api.github.com/repos/desktop/desktop/releases{/id}","deployments_url":"https://api.github.com/repos/desktop/desktop/deployments","created_at":"2016-05-11T15:59:00Z","updated_at":"2018-08-27T14:19:01Z","pushed_at":"2018-08-27T15:40:47Z","git_url":"git://github.com/desktop/desktop.git","ssh_url":"git@github.com:desktop/desktop.git","clone_url":"https://github.com/desktop/desktop.git","svn_url":"https://github.com/desktop/desktop","homepage":"https://desktop.github.com","size":168027,"stargazers_count":5812,"watchers_count":5812,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2385,"mirror_url":null,"archived":false,"open_issues_count":430,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2385,"open_issues":430,"watchers":5812,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/desktop/desktop/pulls/5434"},"html":{"href":"https://github.com/desktop/desktop/pull/5434"},"issue":{"href":"https://api.github.com/repos/desktop/desktop/issues/5434"},"comments":{"href":"https://api.github.com/repos/desktop/desktop/issues/5434/comments"},"review_comments":{"href":"https://api.github.com/repos/desktop/desktop/pulls/5434/comments"},"review_comment":{"href":"https://api.github.com/repos/desktop/desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/desktop/desktop/pulls/5434/commits"},"statuses":{"href":"https://api.github.com/repos/desktop/desktop/statuses/4185b0df0375bdd038b44a7e8015feca3973c005"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shiftkey"}}