diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java index 263e038ead8c..09c71311c194 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java @@ -237,19 +237,19 @@ public class GithubShareAction extends DumbAwareAction { gitPushHandler.addParameters("-u", "origin", "master"); GitPushUtils.trackPushRejectedAsError(gitPushHandler, "Rejected push (" + root.getPresentableUrl() + "): "); errors.addAll(GitHandlerUtil.doSynchronouslyWithExceptions(gitPushHandler)); - if (!errors.isEmpty()) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { - GitUIUtil.showOperationErrors(project, errors, GitBundle.getString("push.active.pushing")); + if (!errors.isEmpty()) { + GitUIUtil.showOperationErrors(project, errors, GitBundle.getString("push.active.pushing")); + } + else { + RefreshAction.doRefresh(project); + Notifications.Bus.notify(new Notification("github", "Success", "Successfully created project ''" + name + "'' on github", + NotificationType.INFORMATION)); + } } }); - } - else { - RefreshAction.doRefresh(project); - Notifications.Bus.notify(new Notification("github", "Success", "Successfully created project ''" + name + "'' on github", - NotificationType.INFORMATION)); - } } }.queue(); }