File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ describe('wiki', async () => {
275
275
'config --local user.name GitHub Actions' ,
276
276
'config --local user.email 41898282+github-actions[bot]@users.noreply.github.com' ,
277
277
'add .' ,
278
- 'commit -m PR #123 - Test PR title\n\nTest PR body ' ,
278
+ 'commit -m PR #123 - Test PR title' ,
279
279
'push origin' ,
280
280
] ) ;
281
281
@@ -334,7 +334,7 @@ describe('wiki', async () => {
334
334
335
335
// Verify commit message format
336
336
const commitCall = vi . mocked ( execFileSync ) . mock . calls . find ( ( call ) => call ?. [ 1 ] ?. includes ( 'commit' ) ) ;
337
- expect ( commitCall ?. [ 1 ] ) . toEqual ( [ 'commit' , '-m' , 'PR #456 - Complex PR title\n\nLine 1\nLine 2\nLine 3 ' ] ) ;
337
+ expect ( commitCall ?. [ 1 ] ) . toEqual ( [ 'commit' , '-m' , 'PR #456 - Complex PR title' ] ) ;
338
338
} ) ;
339
339
} ) ;
340
340
Original file line number Diff line number Diff line change @@ -515,8 +515,14 @@ export function commitAndPushWikiChanges(): void {
515
515
startGroup ( 'Committing and pushing changes to wiki' ) ;
516
516
517
517
try {
518
- const { prBody, prNumber, prTitle } = context ;
519
- const commitMessage = `PR #${ prNumber } - ${ prTitle } \n\n${ prBody } ` . trim ( ) ;
518
+ const { prNumber, prTitle } = context ;
519
+
520
+ // Note: We originally used the PR title and PR body to create the commit message; however, due to the way
521
+ // GitHub formats the commits/revision history for the Wiki it's designed to be smaller and thus we use
522
+ // the PR title for now.
523
+ // Ref: https://github.com/techpivot/terraform-modules-demo/wiki/aws%E2%88%95s3%E2%80%92bucket%E2%80%92object/_history
524
+ // Ref: https://github.com/techpivot/terraform-module-releaser/issues/95
525
+ const commitMessage = `PR #${ prNumber } - ${ prTitle } ` . trim ( ) ;
520
526
const wikiDirectory = resolve ( context . workspaceDir , WIKI_SUBDIRECTORY_NAME ) ;
521
527
const execWikiOpts : ExecSyncOptions = { cwd : wikiDirectory , stdio : 'inherit' } ;
522
528
const gitPath = which . sync ( 'git' ) ;
You can’t perform that action at this time.
0 commit comments