File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -737,7 +737,7 @@ function parseCommitMeta(titleSource: GraphQL.DefaultCommitTitle | undefined, de
737737 }
738738 case GraphQL . DefaultCommitTitle . commitOrPrTitle : {
739739 if ( pullRequest . commits . length === 1 ) {
740- title = `${ pullRequest . commits [ 0 ] . message } ${ prNumberPostfix } ` ;
740+ title = `${ pullRequest . commits [ 0 ] . message . split ( '\n' ) [ 0 ] } ${ prNumberPostfix } ` ;
741741 } else {
742742 title = `${ pullRequest . title } ${ prNumberPostfix } ` ;
743743 }
@@ -750,7 +750,12 @@ function parseCommitMeta(titleSource: GraphQL.DefaultCommitTitle | undefined, de
750750 break ;
751751 }
752752 case GraphQL . DefaultCommitMessage . commitMessages : {
753- description = pullRequest . commits . map ( commit => `* ${ commit . message } ` ) . join ( '\n\n' ) ;
753+ if ( ( pullRequest . commits . length === 1 ) && ( titleSource === GraphQL . DefaultCommitTitle . commitOrPrTitle ) ) {
754+ const split = pullRequest . commits [ 0 ] . message . split ( '\n' ) ;
755+ description = split . length > 1 ? split . slice ( 1 ) . join ( '\n' ) : '' ;
756+ } else {
757+ description = pullRequest . commits . map ( commit => `* ${ commit . message } ` ) . join ( '\n\n' ) ;
758+ }
754759 break ;
755760 }
756761 case GraphQL . DefaultCommitMessage . prTitle : {
You can’t perform that action at this time.
0 commit comments