File tree Expand file tree Collapse file tree
src/main/java/com/junichi11/netbeans/modules/github/issues/issue Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -341,19 +341,21 @@ public void run() {
341341 // can be added only title and body to a pull request
342342 // add other than those after the pull request was created
343343 PullRequest newPullRequest = p .getNewPullRequest ();
344- newPullRequest .setTitle (issueParams .getTitle ())
345- .setBody (issueParams .getBody ());
346- try {
347- PullRequest createdPullRequest = issue .createPullRequest (newPullRequest );
348- if (createdPullRequest != null ) {
349- issue .editIssue (issueParams );
350- p .update ();
351- } else {
352- // show dialog
353- UiUtils .showErrorDialog (Bundle .SubmitIssueAction_message_pull_request_added_fail ());
344+ if (newPullRequest != null ) {
345+ newPullRequest .setTitle (issueParams .getTitle ())
346+ .setBody (issueParams .getBody ());
347+ try {
348+ PullRequest createdPullRequest = issue .createPullRequest (newPullRequest );
349+ if (createdPullRequest != null ) {
350+ issue .editIssue (issueParams );
351+ p .update ();
352+ } else {
353+ // show dialog
354+ UiUtils .showErrorDialog (Bundle .SubmitIssueAction_message_pull_request_added_fail ());
355+ }
356+ } catch (IOException ex ) {
357+ UiUtils .showErrorDialog (ex .getMessage ());
354358 }
355- } catch (IOException ex ) {
356- UiUtils .showErrorDialog (ex .getMessage ());
357359 }
358360 } else {
359361 // add issue
You can’t perform that action at this time.
0 commit comments