From 06d428e1ba79b35b895818fdccc0375d93b03f99 Mon Sep 17 00:00:00 2001 From: Piotr Tomiak Date: Wed, 22 Oct 2025 10:27:07 +0200 Subject: [PATCH] [patronus] PAT-147 Warn about required approval and autoconfigure the push dialog. GitOrigin-RevId: ff3d5c4a2efecfc4b98c2b59308c63cb6af869da --- platform/dvcs-impl/api-dump-experimental.txt | 2 ++ .../dvcs-impl/src/com/intellij/dvcs/push/PushController.java | 5 +++++ .../src/com/intellij/dvcs/push/ui/VcsPushDialog.java | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/platform/dvcs-impl/api-dump-experimental.txt b/platform/dvcs-impl/api-dump-experimental.txt index be2a4d4accf7..bde8032a2198 100644 --- a/platform/dvcs-impl/api-dump-experimental.txt +++ b/platform/dvcs-impl/api-dump-experimental.txt @@ -1,12 +1,14 @@ f:com.intellij.dvcs.push.PushController - com.intellij.openapi.Disposable - *:createCustomPanels(java.util.Collection):java.util.Map +- *:getDialog():com.intellij.dvcs.push.ui.VcsPushDialog *:com.intellij.dvcs.push.ui.CommitNodeUiRenderExtension - a:render(com.intellij.openapi.project.Project,com.intellij.ui.ColoredTreeCellRenderer,com.intellij.dvcs.push.ui.CommitNode):V c:com.intellij.dvcs.push.ui.VcsPushDialog - com.intellij.openapi.ui.DialogWrapper - com.intellij.dvcs.push.ui.VcsPushUi - com.intellij.openapi.actionSystem.UiDataProvider +- *:getCustomPanel(java.lang.String):com.intellij.dvcs.push.VcsPushOptionsPanel - *:getCustomParams():java.util.Map com.intellij.dvcs.push.ui.VcsPushUi - *:hasWarnings():Z diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java index 0de866b5c975..f910b2bc7917 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/PushController.java @@ -388,6 +388,11 @@ public final class PushController implements Disposable { return myPushLog; } + @ApiStatus.Experimental + public @NotNull VcsPushDialog getDialog() { + return myDialog; + } + /** * An exception thrown if a {@link PrePushHandler} has failed to make the decision * by whatever reason: either it had been cancelled, or an execution exception had occurred. diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsPushDialog.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsPushDialog.java index 27d3fbbd0e58..b81705155cfd 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsPushDialog.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/VcsPushDialog.java @@ -359,6 +359,11 @@ public class VcsPushDialog extends DialogWrapper implements VcsPushUi, UiDataPro return panel == null ? null : panel.getValue(); } + @ApiStatus.Experimental + public @Nullable VcsPushOptionsPanel getCustomPanel(@NotNull String id) { + return myCustomPanels.get(id); + } + @Override public void uiDataSnapshot(@NotNull DataSink sink) { sink.set(VcsPushUi.VCS_PUSH_DIALOG, this);