@@ -514,7 +514,6 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
514
514
if dry_run :
515
515
LOG .info ("Would force-push branch `%s' to remote `%s/%s'" ,
516
516
branch , remote_to_push , remote_branch )
517
- return
518
517
else :
519
518
LOG .info ("Force-pushing branch `%s' to remote `%s/%s'" ,
520
519
branch , remote_to_push , remote_branch )
@@ -528,6 +527,10 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
528
527
head = head ))
529
528
if pulls :
530
529
for pull in pulls :
530
+ if dry_run :
531
+ LOG .info ("Pull-request would be updated:\n %s" , pull .html_url )
532
+ continue
533
+
531
534
LOG .info ("Pull-request updated:\n %s" , pull .html_url )
532
535
533
536
if force_editor :
@@ -543,12 +546,18 @@ def fork_and_push_pull_request(g, hosttype, repo_to_fork, rebase,
543
546
elif message :
544
547
pull .edit (body = message )
545
548
LOG .debug ("Updated pull-request message" )
549
+ if dry_run :
550
+ return
546
551
if comment :
547
- # FIXME(jd) we should be able to comment directly on a PR without
548
- # getting it as an issue but pygithub does not allow that yet
552
+ # FIXME(jd) we should be able to comment directly on a PR
553
+ # without getting it as an issue but pygithub does not allow
554
+ # that yet
549
555
repo_to_fork .get_issue (pull .number ).create_comment (comment )
550
556
LOG .debug ("Commented: \" %s\" " , comment )
551
557
else :
558
+ if dry_run :
559
+ LOG .info ("Pull-request would be created." )
560
+ return
552
561
# Create a pull request
553
562
if force_editor or not (title and message ):
554
563
nb_of_commits , git_title , git_message = git_get_title_and_message (
0 commit comments