diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 8a9aa406..8c0b438a 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -529,6 +529,7 @@ model projects {
organizations organizations @relation(fields: [organization_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "fk_projects_organization")
repos repos @relation(fields: [repo_id], references: [id], onDelete: NoAction, onUpdate: NoAction, map: "fk_projects_repo")
teams teams? @relation(fields: [team_id], references: [id], onDelete: Cascade)
+ workflow String
}
/// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
diff --git a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/ProjectSettings.tsx b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/ProjectSettings.tsx
index 1276b113..725fe07f 100644
--- a/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/ProjectSettings.tsx
+++ b/src/app/(dynamic-pages)/(authenticated-pages)/(application-pages)/project/[projectSlug]/(specific-project-pages)/ProjectSettings.tsx
@@ -32,6 +32,7 @@ type ProjectSettingsFormData = {
is_drift_detection_enabled: boolean;
drift_crontab: string;
auto_approve: boolean;
+ workflow: string; // digger.yml workflow
};
export default function ProjectSettings({ project, repositoryName }: ProjectSettingsProps) {
@@ -48,6 +49,7 @@ export default function ProjectSettings({ project, repositoryName }: ProjectSett
is_drift_detection_enabled: project.is_drift_detection_enabled || false,
drift_crontab: project.drift_crontab || '',
auto_approve: project.auto_approve || false,
+ workflow: project.workflow || "default",
},
});
@@ -66,6 +68,7 @@ export default function ProjectSettings({ project, repositoryName }: ProjectSett
is_drift_detection_enabled: data.is_drift_detection_enabled,
drift_crontab: data.drift_crontab,
auto_approve: data.auto_approve,
+ workflow: data.workflow
});
return result;
},
@@ -136,6 +139,22 @@ export default function ProjectSettings({ project, repositoryName }: ProjectSett
/>
+
+
+
+ (
+
+ )}
+ />
+
+
-
+
> {
const prisma = new PrismaClient();
@@ -1015,6 +1019,7 @@ export async function updateProjectSettingsAction({
is_drift_detection_enabled,
drift_crontab,
auto_approve,
+ workflow,
}
});
diff --git a/supabase/migrations/20241122153227_add_workflow_to_project.sql b/supabase/migrations/20241122153227_add_workflow_to_project.sql
new file mode 100644
index 00000000..b67e1149
--- /dev/null
+++ b/supabase/migrations/20241122153227_add_workflow_to_project.sql
@@ -0,0 +1 @@
+ALTER table projects add column workflow TEXT default 'default';
\ No newline at end of file