public override bool Initialize(string url)
{
var match = _visualStudioTeamServicesRegex.Match(url);
if (!match.Success)
{
return false;
}
CompanyName = match.Groups["accountname"].Value;
CompanyUrl = match.Groups["companyurl"].Value;
ProjectName = match.Groups["project"].Value;
if (string.IsNullOrWhiteSpace(ProjectName))
{
ProjectName = match.Groups["repo"].Value;
}
// In the VSTS provider, the ProjectUrl will represent
// the repository's name.
ProjectUrl = match.Groups["repo"].Value;
if (!CompanyUrl.StartsWithIgnoreCase("https://"))
{
CompanyUrl = String.Concat("https://", CompanyUrl);
}
return true;
}