File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -54,22 +54,24 @@ export async function pushGeneratedCode(): Promise<void> {
54
54
return ;
55
55
}
56
56
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 }
65
-
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="
66
61
Co-authored-by: %an <%ae>
67
62
%(trailers:key=Co-authored-by)"` ,
68
63
) ;
69
64
65
+ if ( IS_RELEASE_COMMIT && isMainBranch ) {
66
+ console . log ( 'Processing release commit' ) ;
67
+ message = `${ text . commitReleaseMessage } [skip ci]` ;
68
+ }
69
+
70
+ message += authors ;
71
+
70
72
console . log ( `Pushing code to generated branch: '${ branchToPush } '` ) ;
71
73
await run ( 'git add .' ) ;
72
- await run ( `git commit -m "${ commitMessage . replaceAll ( '"' , '\\"' ) } "` ) ;
74
+ await run ( `git commit -m "${ message . replaceAll ( '"' , '\\"' ) } "` ) ;
73
75
await run ( `git push origin ${ branchToPush } ` ) ;
74
76
75
77
setOutput ( 'GENERATED_COMMIT' , await run ( 'git rev-parse HEAD' ) ) ;
You can’t perform that action at this time.
0 commit comments