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> {
53
53
return ;
54
54
}
55
55
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="
60
60
61
61
62
62
Co-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)"` ,
66
64
) ;
67
65
66
+ if ( IS_RELEASE_COMMIT && isMainBranch ) {
67
+ console . log ( 'Processing release commit' ) ;
68
+ message = `${ text . commitReleaseMessage } [skip ci]` ;
69
+ }
70
+
71
+ message += authors ;
72
+
68
73
console . log ( `Pushing code to generated branch: '${ branchToPush } '` ) ;
69
74
await run ( 'git add .' ) ;
70
- await run ( `git commit -m "${ commitMessage . replaceAll ( '"' , '\\"' ) } " --cleanup=verbatim ` ) ;
75
+ await run ( `git commit -m "${ message . replaceAll ( '"' , '\\"' ) } "` ) ;
71
76
await run ( `git push origin ${ branchToPush } ` ) ;
72
77
73
78
setOutput ( 'GENERATED_COMMIT' , await run ( 'git rev-parse HEAD' ) ) ;
You can’t perform that action at this time.
0 commit comments