Parcourir la source

Connected api and updated launch flow to use build config

jnfrati il y a 4 ans
Parent
commit
48393db84d

+ 16 - 16
dashboard/src/components/repo-selector/ActionDetails.tsx

@@ -270,22 +270,22 @@ export const BuildpackSelection: React.FC<{
   }, [selectedBuilder, selectedStack, selectedBuildpacks]);
 
   useEffect(() => {
-    // api
-    //   .detectBuildpack<DetectBuildpackResponse>(
-    //     "<token>",
-    //     {
-    //       dir: folderPath || ".",
-    //     },
-    //     {
-    //       project_id: currentProject.id,
-    //       git_repo_id: actionConfig.git_repo_id,
-    //       kind: "github",
-    //       owner: actionConfig.git_repo.split("/")[0],
-    //       name: actionConfig.git_repo.split("/")[1],
-    //       branch: branch,
-    //     }
-    //   )
-    getMockData()
+    api
+      .detectBuildpack<DetectBuildpackResponse>(
+        "<token>",
+        {
+          dir: folderPath || ".",
+        },
+        {
+          project_id: currentProject.id,
+          git_repo_id: actionConfig.git_repo_id,
+          kind: "github",
+          owner: actionConfig.git_repo.split("/")[0],
+          name: actionConfig.git_repo.split("/")[1],
+          branch: branch,
+        }
+      )
+      // getMockData()
       .then(({ data }) => {
         const builders = data;
 

+ 1 - 0
dashboard/src/main/home/launch/launch-flow/LaunchFlow.tsx

@@ -269,6 +269,7 @@ const LaunchFlow: React.FC<PropsType> = (props) => {
           template_version: props.currentTemplate?.currentVersion || "latest",
           name: release_name,
           github_action_config: githubActionConfig,
+          build_config: buildConfig,
         },
         {
           id: currentProject.id,