File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -53,21 +53,26 @@ export async function pushGeneratedCode(): Promise<void> {
5353 return ;
5454 }
5555
56- let baseMessage = IS_RELEASE_COMMIT && isMainBranch ? text . commitReleaseMessage : `%s ${ text . commitEndMessage } ` ;
57-
58- const commitMessage = await run (
59- `git show -s ${ baseBranch } --format="${ baseMessage }
56+ const skipCi = isMainBranch ? '[skip ci]' : '' ;
57+ let message = await run ( `git show -s ${ baseBranch } --format="%s ${ text . commitEndMessage } ${ skipCi } "` ) ;
58+ const authors = await run (
59+ `git show -s ${ baseBranch } --format="
6060
6161
6262Co-authored-by: %an <%ae>
63- skip-checks: true
64- %(trailers:key=Co-authored-by)
65- %(trailers:key=skip-checks)"` ,
63+ %(trailers:key=Co-authored-by)"` ,
6664 ) ;
6765
66+ if ( IS_RELEASE_COMMIT && isMainBranch ) {
67+ console . log ( 'Processing release commit' ) ;
68+ message = `${ text . commitReleaseMessage } [skip ci]` ;
69+ }
70+
71+ message += authors ;
72+
6873 console . log ( `Pushing code to generated branch: '${ branchToPush } '` ) ;
6974 await run ( 'git add .' ) ;
70- await run ( `git commit -m "${ commitMessage . replaceAll ( '"' , '\\"' ) } " --cleanup=verbatim ` ) ;
75+ await run ( `git commit -m "${ message . replaceAll ( '"' , '\\"' ) } "` ) ;
7176 await run ( `git push origin ${ branchToPush } ` ) ;
7277
7378 setOutput ( 'GENERATED_COMMIT' , await run ( 'git rev-parse HEAD' ) ) ;
You can’t perform that action at this time.
0 commit comments