Skip to content

Commit

Permalink
Give warning for descriptions >78 instead of killing process (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir authored May 11, 2020
1 parent 7d100ae commit e225ac1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions automated_packaging/common_functions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,13 @@ sub create_release_changelog {
foreach $line (@log_output) {
if ($line =~ /^DESCRIPTION: */) {
$description_part = substr($line, length($&), -1);

if (length($description_part) > 78) {
print("You have to shorten PR message $description_part of $pr_url");
`git reset --hard`;
die "Can not add description longer than 78 charachters";
print("You have to shorten PR message $description_part of $pr_url\n");
print("Description should not be longer than 78 charachters, please manually shorten this description\n");
push(@comment_lines, "TODO: " . "PLEASE SHORTEN THE NEXT LINE MANUALLY, IT SHOULD BE NO LONGER THAN 78 CHARS\n");
}

print("Description $description_part has been added ... \n");
push(@comment_lines, "* " . $description_part . "\n\n");
}
Expand Down

0 comments on commit e225ac1

Please sign in to comment.