@@ -523,14 +523,17 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
523
523
524
524
if pulls :
525
525
for pull in pulls :
526
- # If there's only one commit, it's very likely the new PR title
527
- # should be the actual current title. Otherwise, it's unlikely the
528
- # title we autogenerate is going to be better than one might be in
529
- # place now, so keep it.
530
- if nb_commits == 1 :
531
- ptitle = git_title
526
+ if title is None :
527
+ # If there's only one commit, it's very likely the new PR title
528
+ # should be the actual current title. Otherwise, it's unlikely
529
+ # the title we autogenerate is going to be better than one
530
+ # might be in place now, so keep it.
531
+ if nb_commits == 1 :
532
+ ptitle = git_title
533
+ else :
534
+ ptitle = pull .title
532
535
else :
533
- ptitle = pull . title
536
+ ptitle = title
534
537
535
538
body = textparse .concat_with_ignore_marker (
536
539
message or git_message ,
@@ -540,6 +543,10 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
540
543
541
544
ptitle , body = edit_title_and_message (ptitle , body )
542
545
546
+ if ptitle is None :
547
+ LOG .critical ("Pull-request message is empty, aborting" )
548
+ return 40
549
+
543
550
if ptitle and body :
544
551
if dry_run :
545
552
LOG .info ("Would edit title and body" )
@@ -579,6 +586,8 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
579
586
else :
580
587
LOG .debug ("Adding labels %s" , labels )
581
588
pull .add_to_labels (* labels )
589
+
590
+ LOG .info ("Pull-request updated: %s" , pull .html_url )
582
591
else :
583
592
# Create a pull request
584
593
if not title or not message :
0 commit comments