{"action":"created","issue":{"url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/3","labels_url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/3/comments","events_url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/3/events","html_url":"https://github.com/GitTools/GitTools.Core/issues/3","id":69628731,"number":3,"title":"Encapsulate LigGitSharp and expose our own abstraction layer for the bits we need to.","user":{"login":"dazinator","id":3176632,"avatar_url":"https://avatars.githubusercontent.com/u/3176632?v=3","gravatar_id":"","url":"https://api.github.com/users/dazinator","html_url":"https://github.com/dazinator","followers_url":"https://api.github.com/users/dazinator/followers","following_url":"https://api.github.com/users/dazinator/following{/other_user}","gists_url":"https://api.github.com/users/dazinator/gists{/gist_id}","starred_url":"https://api.github.com/users/dazinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazinator/subscriptions","organizations_url":"https://api.github.com/users/dazinator/orgs","repos_url":"https://api.github.com/users/dazinator/repos","events_url":"https://api.github.com/users/dazinator/events{/privacy}","received_events_url":"https://api.github.com/users/dazinator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GitTools/GitTools.Core/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GitTools/GitTools.Core/milestones/1","html_url":"https://github.com/GitTools/GitTools.Core/milestones/1.0.0","labels_url":"https://api.github.com/repos/GitTools/GitTools.Core/milestones/1/labels","id":1077738,"number":1,"title":"1.0.0","description":"","creator":{"login":"GeertvanHorrik","id":1246444,"avatar_url":"https://avatars.githubusercontent.com/u/1246444?v=3","gravatar_id":"","url":"https://api.github.com/users/GeertvanHorrik","html_url":"https://github.com/GeertvanHorrik","followers_url":"https://api.github.com/users/GeertvanHorrik/followers","following_url":"https://api.github.com/users/GeertvanHorrik/following{/other_user}","gists_url":"https://api.github.com/users/GeertvanHorrik/gists{/gist_id}","starred_url":"https://api.github.com/users/GeertvanHorrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeertvanHorrik/subscriptions","organizations_url":"https://api.github.com/users/GeertvanHorrik/orgs","repos_url":"https://api.github.com/users/GeertvanHorrik/repos","events_url":"https://api.github.com/users/GeertvanHorrik/events{/privacy}","received_events_url":"https://api.github.com/users/GeertvanHorrik/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2015-04-21T19:26:07Z","updated_at":"2015-04-21T20:19:25Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2015-04-20T16:45:56Z","updated_at":"2015-04-23T12:39:17Z","closed_at":null,"body":"I think we are all agreed this should be a long term goal for the core (correct me if I am wrong)\r\n\r\nI'm not sure if it's better to do this for version 1, if we do it for version 2, we will potentially have to refactor all the tools multiple times (once for version 1, and again for version 2)\r\n\r\nPerhaps it would be better to have this in the initial release - as this will no doubt form a major part of the public API for GitCore? What do you think?"},"comment":{"url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/comments/95572853","html_url":"https://github.com/GitTools/GitTools.Core/issues/3#issuecomment-95572853","issue_url":"https://api.github.com/repos/GitTools/GitTools.Core/issues/3","id":95572853,"user":{"login":"dazinator","id":3176632,"avatar_url":"https://avatars.githubusercontent.com/u/3176632?v=3","gravatar_id":"","url":"https://api.github.com/users/dazinator","html_url":"https://github.com/dazinator","followers_url":"https://api.github.com/users/dazinator/followers","following_url":"https://api.github.com/users/dazinator/following{/other_user}","gists_url":"https://api.github.com/users/dazinator/gists{/gist_id}","starred_url":"https://api.github.com/users/dazinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dazinator/subscriptions","organizations_url":"https://api.github.com/users/dazinator/orgs","repos_url":"https://api.github.com/users/dazinator/repos","events_url":"https://api.github.com/users/dazinator/events{/privacy}","received_events_url":"https://api.github.com/users/dazinator/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T12:39:17Z","updated_at":"2015-04-23T12:39:17Z","body":"@GeertvanHorrik - this is the ensure remote code I took from GitReleaseNotes - seems to throw if not 1 remote.\r\n\r\n```\r\n private Remote EnsureSingleRemoteIsDefined()\r\n        {\r\n            var remotes = Repository.Network.Remotes;\r\n            var howMany = remotes.Count();\r\n\r\n            if (howMany == 1)\r\n            {\r\n                var remote = remotes.Single();\r\n\r\n                Log.InfoFormat(\"One remote found ({0} -> '{1}').\", remote.Name, remote.Url);\r\n                return remote;\r\n            }\r\n\r\n            var message = string.Format(\"{0} remote(s) have been detected. When being run on a TeamCity agent, the Git repository is expected to bear one (and no more than one) remote.\", howMany);\r\n            throw new InvalidOperationException(message);\r\n        }\r\n```"}}