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
7
7
8
8
public static class GitHelper
9
9
{
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) )" ;
11
11
12
12
public static void NormalizeGitDirectory ( string gitDirectory , Authentication authentication )
13
13
{
@@ -76,6 +76,7 @@ public static string ExtractIssueNumber(string mergeMessage)
76
76
// Dynamic: refs/heads/pr/5
77
77
// Github Message: refs/heads/pull/5/merge
78
78
// Stash Message: refs/heads/pull-requests/5/merge
79
+ // refs/heads/pull/5/head
79
80
var regex = new Regex ( MergeMessageRegexPattern ) ;
80
81
var match = regex . Match ( mergeMessage ) ;
81
82
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class PullRequestInTeamCityTest
10
10
11
11
[ TestCase ( "refs/pull-requests/5/merge" ) ]
12
12
[ TestCase ( "refs/pull/5/merge" ) ]
13
+ [ TestCase ( "refs/heads/pull/5/head" ) ]
13
14
public void GivenARemoteWithATagOnMaster_AndAPullRequestWithTwoCommits_AndBuildIsRunningInTeamCity_VersionIsCalculatedProperly ( string pullRequestRef )
14
15
{
15
16
using ( var fixture = new EmptyRepositoryFixture ( new Config ( ) ) )
You can’t perform that action at this time.
0 commit comments