Преглед на файлове

stop dockerfile detection if app exists (#3676)

Co-authored-by: Feroze Mohideen <feroze@porter.run>
ianedwards преди 2 години
родител
ревизия
095ec3e8c0
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      dashboard/src/main/home/app-dashboard/create-app/RepoSettings.tsx

+ 3 - 2
dashboard/src/main/home/app-dashboard/create-app/RepoSettings.tsx

@@ -74,7 +74,7 @@ const RepoSettings: React.FC<Props> = ({
   );
   );
 
 
   useEffect(() => {
   useEffect(() => {
-    if (!branchContents) {
+    if (!branchContents || appExists) {
       return;
       return;
     }
     }
 
 
@@ -85,7 +85,7 @@ const RepoSettings: React.FC<Props> = ({
     if (!hasDockerfile) {
     if (!hasDockerfile) {
       setValue("app.build.buildpacks", []);
       setValue("app.build.buildpacks", []);
     }
     }
-  }, [branchContents]);
+  }, [branchContents, appExists]);
 
 
   return (
   return (
     <div>
     <div>
@@ -266,6 +266,7 @@ const RepoSettings: React.FC<Props> = ({
                         projectId={projectId}
                         projectId={projectId}
                         build={b}
                         build={b}
                         source={source}
                         source={source}
+                        autoDetectionDisabled={appExists}
                       />
                       />
                     ))
                     ))
                     .exhaustive()}
                     .exhaustive()}