Skip to content

Commit

Permalink
Remove empty lines in release message
Browse files Browse the repository at this point in the history
  • Loading branch information
pensiero committed Feb 28, 2017
1 parent ac765eb commit b4cf085
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Controller/ConsoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ public function createRelease($version)

// create a release body with compared commits
$releaseBody = implode($commits, "\n");

// remove subcommits (lines that start with "*")
$releaseBody = preg_replace('/\*.*/', '', $releaseBody);
$releaseBody = trim(preg_replace('/\n\n/', '', $releaseBody));

// remove empty lines
$releaseBody = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $releaseBody);

// create a PR
try {
Expand Down

0 comments on commit b4cf085

Please sign in to comment.