@@ -911,9 +911,21 @@ func TestClassifyNonConventional(t *testing.T) {
911911
912912func runGit (t * testing.T , dir string , args ... string ) {
913913 t .Helper ()
914+ // Lightweight tags with a message when global tag signing is enabled.
915+ if len (args ) >= 2 && args [0 ] == "tag" && args [1 ][0 ] != '-' {
916+ args = []string {"tag" , "-m" , "test tag" , args [1 ]}
917+ }
914918 cmd := exec .CommandContext (context .Background (), "git" , args ... )
915919 cmd .Dir = dir
916- cmd .Env = append (os .Environ (), "GIT_AUTHOR_DATE=2024-01-01T00:00:00Z" , "GIT_COMMITTER_DATE=2024-01-01T00:00:00Z" )
920+ cmd .Env = append (os .Environ (),
921+ "GIT_AUTHOR_DATE=2024-01-01T00:00:00Z" ,
922+ "GIT_COMMITTER_DATE=2024-01-01T00:00:00Z" ,
923+ "GIT_CONFIG_COUNT=2" ,
924+ "GIT_CONFIG_KEY_0=commit.gpgsign" ,
925+ "GIT_CONFIG_VALUE_0=false" ,
926+ "GIT_CONFIG_KEY_1=tag.gpgsign" ,
927+ "GIT_CONFIG_VALUE_1=false" ,
928+ )
917929 output , err := cmd .CombinedOutput ()
918930 if err != nil {
919931 t .Fatalf ("git %v failed: %v\n output: %s" , args , err , output )
0 commit comments