Skip to content

GitVersion regex makes duplicate match for Copilot Agent branches #173

@johlju

Description

@johlju

Problem description

The issue is in the GitVersion.yml file. Both the feature and hotfix regex patterns are matching the branch name, e.g. copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb because:

The feature regex f(eature(s)?)?[/-] matches the "f-" in "9def-"
The hotfix regex (hot)?fix(es)?[/-] matches "fix" in the branch name

Verbose logs

2025-08-27T15:49:38.9437839Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9459156Z  - feature
2025-08-27T15:49:38.9461255Z  - hotfix'
2025-08-27T15:49:38.9466690Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9467787Z  - feature
2025-08-27T15:49:38.9468464Z  - hotfix'
2025-08-27T15:49:38.9537489Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9541190Z  - feature
2025-08-27T15:49:38.9541727Z  - hotfix'
2025-08-27T15:49:38.9563460Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9566523Z  - feature
2025-08-27T15:49:38.9567830Z  - hotfix'
2025-08-27T15:49:38.9709748Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9713651Z  - feature
2025-08-27T15:49:38.9722245Z  - hotfix'
2025-08-27T15:49:38.9724318Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9725673Z  - feature
2025-08-27T15:49:38.9728137Z  - hotfix'
2025-08-27T15:49:38.9729935Z Multiple branch configurations match the current branch branchName of 'copilot/fix-463fe4ce-02c8-4d81-9def-9dd21cb3e3cb'. Using the first matching configuration, 'feature'. Matching configurations include:'
2025-08-27T15:49:38.9731132Z  - feature
2025-08-27T15:49:38.9732149Z  - hotfix'
2025-08-27T15:49:39.6981001Z {
2025-08-27T15:49:39.6996296Z   "Major": 0,
2025-08-27T15:49:39.6997166Z   "Minor": 24,
2025-08-27T15:49:39.6997825Z   "Patch": 2,
2025-08-27T15:49:39.6999288Z   "PreReleaseTag": "PR0171.9",
2025-08-27T15:49:39.7000098Z   "PreReleaseTagWithDash": "-PR0171.9",
2025-08-27T15:49:39.7000802Z   "PreReleaseLabel": "PR0171",
2025-08-27T15:49:39.7004833Z   "PreReleaseLabelWithDash": "-PR0171",
2025-08-27T15:49:39.7007036Z   "PreReleaseNumber": 9,
2025-08-27T15:49:39.7007841Z   "WeightedPreReleaseNumber": 30009,
2025-08-27T15:49:39.7008439Z   "BuildMetaData": null,
2025-08-27T15:49:39.7008921Z   "BuildMetaDataPadded": "",
2025-08-27T15:49:39.7011749Z   "FullBuildMetaData": "Branch.pull-171-merge.Sha.ec7aa09ecb846c9b1a6a6d79471020da1cccde8a",
2025-08-27T15:49:39.7012383Z   "MajorMinorPatch": "0.24.2",
2025-08-27T15:49:39.7013852Z   "SemVer": "0.24.2-PR0171.9",
2025-08-27T15:49:39.7015393Z   "LegacySemVer": "0.24.2-PR0171-9",
2025-08-27T15:49:39.7016902Z   "LegacySemVerPadded": "0.24.2-PR0171-0009",
2025-08-27T15:49:39.7017760Z   "AssemblySemVer": "0.24.2.0",
2025-08-27T15:49:39.7018272Z   "AssemblySemFileVer": "0.24.2.0",
2025-08-27T15:49:39.7018722Z   "FullSemVer": "0.24.2-PR0171.9",
2025-08-27T15:49:39.7019307Z   "InformationalVersion": "0.24.2-pr0171-0009+Sha.ec7aa09ecb846c9b1a6a6d79471020da1cccde8a.Date.2025-08-27",
2025-08-27T15:49:39.7020538Z   "BranchName": "pull/171/merge",
2025-08-27T15:49:39.7021546Z   "EscapedBranchName": "pull-171-merge",
2025-08-27T15:49:39.7022041Z   "Sha": "ec7aa09ecb846c9b1a6a6d79471020da1cccde8a",
2025-08-27T15:49:39.7022531Z   "ShortSha": "ec7aa09",
2025-08-27T15:49:39.7023128Z   "NuGetVersionV2": "0.24.2-pr0171-0009",
2025-08-27T15:49:39.7023692Z   "NuGetVersion": "0.24.2-pr0171-0009",
2025-08-27T15:49:39.7025159Z   "NuGetPreReleaseTagV2": "pr0171-0009",
2025-08-27T15:49:39.7026796Z   "NuGetPreReleaseTag": "pr0171-0009",
2025-08-27T15:49:39.7027400Z   "VersionSourceSha": "2b7e4d6d464b4999782fbf6857bcbbc1024f9162",
2025-08-27T15:49:39.7037662Z   "CommitsSinceVersionSource": 9,
2025-08-27T15:49:39.7038418Z   "CommitsSinceVersionSourcePadded": "0009",
2025-08-27T15:49:39.7039019Z   "UncommittedChanges": 0,
2025-08-27T15:49:39.7039719Z   "CommitDate": "2025-08-27"
2025-08-27T15:49:39.7043487Z }

How to reproduce

n/a

Expected behavior

n/a

Current behavior

n/a

Suggested solution

n/a

Operating system the target node is running

n/a

PowerShell version and build the target node is running

n/a

Module version used

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions