Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #71 from neutmute/develop
Browse files Browse the repository at this point in the history
#70 allow periods in the bitbucket repository name
  • Loading branch information
GeertvanHorrik committed Nov 25, 2015
2 parents ab160c0 + 9e3de76 commit 948805a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/GitLink.Tests/Providers/BitBucketProviderFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public void ReturnsValidProjectUrl()
Assert.AreEqual("https://bitbucket.org/CatenaLogic/GitLink", provider.ProjectUrl);
}

[TestCase]
public void ReturnsValidProjectUrlWhenContainsPeriod()
{
var provider = new BitBucketProvider();
provider.Initialize("https://bitbucket.org/CatenaLogic/dotted.Project");

Assert.AreEqual("https://bitbucket.org/CatenaLogic/dotted.Project", provider.ProjectUrl);
}

[TestCase]
public void ReturnsValidRawGitUrl()
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitLink/Providers/BitBucketProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace GitLink.Providers

public class BitBucketProvider : ProviderBase
{
private readonly Regex _gitHubRegex = new Regex(@"(?<url>(?<companyurl>(?:https://)?bitbucket\.org/(?<company>[^/]+))/(?<project>[^\./]+))");
private readonly Regex _gitHubRegex = new Regex(@"(?<url>(?<companyurl>(?:https://)?bitbucket\.org/(?<company>[^/]+))/(?<project>[^/]+))");

public BitBucketProvider()
: base(new GitPreparer())
Expand Down

0 comments on commit 948805a

Please sign in to comment.