File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
GitVersionCore/BuildServers Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace GitVersion
77
88 public static class GitHelper
99 {
10- const string MergeMessageRegexPattern = "refs/heads/(pr|pull(-requests)?/(?<issuenumber>[0-9]*)/merge)" ;
10+ const string MergeMessageRegexPattern = "refs/heads/(pr|pull(-requests)?/(?<issuenumber>[0-9]*)/( merge|head) )" ;
1111
1212 public static void NormalizeGitDirectory ( string gitDirectory , Authentication authentication )
1313 {
@@ -76,6 +76,7 @@ public static string ExtractIssueNumber(string mergeMessage)
7676 // Dynamic: refs/heads/pr/5
7777 // Github Message: refs/heads/pull/5/merge
7878 // Stash Message: refs/heads/pull-requests/5/merge
79+ // refs/heads/pull/5/head
7980 var regex = new Regex ( MergeMessageRegexPattern ) ;
8081 var match = regex . Match ( mergeMessage ) ;
8182
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class PullRequestInTeamCityTest
1010
1111 [ TestCase ( "refs/pull-requests/5/merge" ) ]
1212 [ TestCase ( "refs/pull/5/merge" ) ]
13+ [ TestCase ( "refs/heads/pull/5/head" ) ]
1314 public void GivenARemoteWithATagOnMaster_AndAPullRequestWithTwoCommits_AndBuildIsRunningInTeamCity_VersionIsCalculatedProperly ( string pullRequestRef )
1415 {
1516 using ( var fixture = new EmptyRepositoryFixture ( new Config ( ) ) )
You can’t perform that action at this time.
0 commit comments