@@ -104,7 +104,7 @@ func TestCLI_BumpAutoCmd_InferredBump(t *testing.T) {
104104 versionPath := testutils .WriteTempVersionFile (t , tmp , "1.2.3" )
105105
106106 deps := defaultTestDeps ()
107- deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until string ) string {
107+ deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
108108 return "minor"
109109 }
110110 ctx := testContext (deps )
@@ -199,7 +199,7 @@ func TestCLI_BumpAutoCmd_InferredPromotion(t *testing.T) {
199199 versionPath := testutils .WriteTempVersionFile (t , tmp , "1.2.3-beta.1" )
200200
201201 deps := defaultTestDeps ()
202- deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until string ) string {
202+ deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
203203 return "minor"
204204 }
205205 ctx := testContext (deps )
@@ -228,7 +228,7 @@ func TestCLI_BumpAutoCmd_PromotePreReleaseWithPreserveMeta(t *testing.T) {
228228 versionPath := testutils .WriteTempVersionFile (t , tmp , "1.2.3-beta.2+ci.99" )
229229
230230 deps := defaultTestDeps ()
231- deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until string ) string {
231+ deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
232232 return "minor" // Force a non-empty inference so that promotePreRelease is called
233233 }
234234 ctx := testContext (deps )
@@ -279,7 +279,7 @@ func TestCLI_BumpAutoCmd_InferredBumpFails(t *testing.T) {
279279 deps .newBumper = func () semver.VersionBumper {
280280 return mockBumper {bumpByLabelErr : fmt .Errorf ("forced inferred bump failure" )}
281281 }
282- deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until string ) string {
282+ deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
283283 return "minor"
284284 }
285285 ctx := testContext (deps )
@@ -308,7 +308,7 @@ func TestTryInferBumpTypeFromCommitParserPlugin_GetCommitsError(t *testing.T) {
308308 t .Fatalf ("failed to register parser: %v" , err )
309309 }
310310 // Without a real git repo, getCommits will fail → should return ""
311- label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" )
311+ label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" , "" , "" )
312312 if label != "" {
313313 t .Errorf ("expected empty label on gitlog error, got %q" , label )
314314 }
@@ -321,15 +321,15 @@ func TestTryInferBumpTypeFromCommitParserPlugin_ParserError(t *testing.T) {
321321 if err := registry .RegisterCommitParser (& parser ); err != nil {
322322 t .Fatalf ("failed to register parser: %v" , err )
323323 }
324- label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" )
324+ label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" , "" , "" )
325325 if label != "" {
326326 t .Errorf ("expected empty label on error, got %q" , label )
327327 }
328328}
329329
330330func TestTryInferBumpTypeFromCommitParserPlugin_NoParser (t * testing.T ) {
331331 registry := plugins .NewPluginRegistry ()
332- label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" )
332+ label := tryInferBumpTypeFromCommitParserPlugin (registry , "" , "" , "" , "" )
333333 if label != "" {
334334 t .Errorf ("expected empty label when no parser, got %q" , label )
335335 }
@@ -547,11 +547,13 @@ func TestDetermineBumpType(t *testing.T) {
547547 t .Run (tt .name , func (t * testing.T ) {
548548 deps := & bumpDeps {
549549 inferFromChangelog : func (registry * plugins.PluginRegistry ) string { return tt .mockChangelog },
550- inferFromCommits : func (registry * plugins.PluginRegistry , since , until string ) string { return tt .mockCommit },
550+ inferFromCommits : func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
551+ return tt .mockCommit
552+ },
551553 }
552554
553555 registry := plugins .NewPluginRegistry ()
554- result := determineBumpType (deps , registry , tt .label , tt .disableInfer , "" , "" )
556+ result := determineBumpType (deps , registry , tt .label , tt .disableInfer , "" , "" , "" , "" )
555557
556558 if string (result ) != tt .expected {
557559 t .Errorf ("expected %q, got %q" , tt .expected , string (result ))
@@ -836,7 +838,7 @@ func TestBumpAuto_InferredMinorBump_WithTagManager(t *testing.T) {
836838 testutils .WriteTempVersionFile (t , tmpDir , "1.0.0" )
837839
838840 deps := defaultTestDeps ()
839- deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until string ) string {
841+ deps .inferFromCommits = func (registry * plugins.PluginRegistry , since , until , tagPrefix , modulePath string ) string {
840842 return "minor"
841843 }
842844 ctx := testContext (deps )
0 commit comments