@@ -992,7 +992,7 @@ describe("push_signed_commits integration tests", () => {
992992 expect ( githubClient . graphql ) . not . toHaveBeenCalled ( ) ;
993993
994994 // Warning about the merge commit must be emitted
995- expect ( mockCore . warning ) . toHaveBeenCalledWith ( expect . stringMatching ( / m e r g e c o m m i t [ 0 - 9 a - f ] + d e t e c t e d / ) ) ;
995+ expect ( mockCore . warning ) . toHaveBeenCalledWith ( expect . stringMatching ( / m e r g e c o m m i t [ 0 - 9 a - f ] { 7 , 40 } d e t e c t e d / ) ) ;
996996 expect ( mockCore . warning ) . toHaveBeenCalledWith ( expect . stringContaining ( "falling back to git push" ) ) ;
997997
998998 // All commits (including the merge commit) must be present on the remote via git push
@@ -1008,7 +1008,10 @@ describe("push_signed_commits integration tests", () => {
10081008 execGit ( [ "checkout" , "-b" , "tricky-message-branch" ] , { cwd : workDir } ) ;
10091009 fs . writeFileSync ( path . join ( workDir , "tricky.txt" ) , "tricky content\n" ) ;
10101010 execGit ( [ "add" , "tricky.txt" ] , { cwd : workDir } ) ;
1011- execGit ( [ "commit" , "-m" , "Normal headline\n\nparent this line starts with parent but is not a git parent header" ] , { cwd : workDir } ) ;
1011+ // Write the multi-line commit message to a file to avoid shell interpretation issues
1012+ const msgFile = path . join ( workDir , ".git" , "TRICKY_MSG" ) ;
1013+ fs . writeFileSync ( msgFile , "Normal headline\n\nparent this line starts with parent but is not a git parent header\n" ) ;
1014+ execGit ( [ "commit" , "-F" , msgFile ] , { cwd : workDir } ) ;
10121015 execGit ( [ "push" , "-u" , "origin" , "tricky-message-branch" ] , { cwd : workDir } ) ;
10131016
10141017 global . exec = makeRealExec ( workDir ) ;
0 commit comments