File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -54,25 +54,22 @@ export async function pushGeneratedCode(): Promise<void> {
5454 return ;
5555 }
5656
57- const skipCi = isMainBranch ? '[skip ci]' : '' ;
58- let message = await run ( `git show -s ${ baseBranch } --format=%s ${ text . commitEndMessage } ${ skipCi } "` ) ;
59- const authors = await run (
60- `git show -s ${ baseBranch } --format="
57+ let skipCi = '' ;
58+ if ( IS_RELEASE_COMMIT || isMainBranch ) {
59+ console . log ( 'Processing release commit' ) ;
60+ skipCi = '[skip ci]' ;
61+ }
62+
63+ const commitMessage = await run (
64+ `git show -s ${ baseBranch } --format="%s ${ text . commitEndMessage } ${ skipCi }
6165
6266Co-authored-by: %an <%ae>
6367%(trailers:key=Co-authored-by)"` ,
6468 ) ;
6569
66- if ( IS_RELEASE_COMMIT && isMainBranch ) {
67- console . log ( 'Processing release commit' ) ;
68- message = `${ text . commitReleaseMessage } [skip ci]` ;
69- }
70-
71- message += authors ;
72-
7370 console . log ( `Pushing code to generated branch: '${ branchToPush } '` ) ;
7471 await run ( 'git add .' ) ;
75- await run ( `git commit -m "${ message } "` ) ;
72+ await run ( `git commit -m "${ commitMessage . replaceAll ( '"' , '\\"' ) } "` ) ;
7673 await run ( `git push origin ${ branchToPush } ` ) ;
7774
7875 setOutput ( 'GENERATED_COMMIT' , await run ( 'git rev-parse HEAD' ) ) ;
You can’t perform that action at this time.
0 commit comments