making some of the additional fields less wrong

This commit is contained in:
Brendan Forster
2014-04-30 13:34:11 +08:00
parent 31e9577599
commit 46afc41015
2 changed files with 6 additions and 4 deletions
@@ -42,12 +42,14 @@ namespace Octokit
Owner = owner ?? ""; // TODO: this is a total hack
RepositoryName = name;
OwnerIsOrganization = ownerIsOrganization;
OwnerIsOrganization = !String.IsNullOrWhiteSpace(owner);
var webBaseAddress = baseAddress.Host != GitHubClient.GitHubApiUrl.Host
? baseAddress
: GitHubClient.GitHubDotComUrl;
ExistingRepositoryWebUrl = new Uri(webBaseAddress, new Uri(owner + "/" + name, UriKind.Relative));
string messageFormat = ownerIsOrganization
ExistingRepositoryWebUrl = OwnerIsOrganization
? new Uri(webBaseAddress, new Uri(owner + "/" + name, UriKind.Relative))
: null;
string messageFormat = OwnerIsOrganization
? "There is already a repository named '{0}' in the organization '{1}'."
: "There is already a repository named '{0}' for the current account.";