From a7c70c3fb10d7d46b5673e8167bfc7dde9407b6d Mon Sep 17 00:00:00 2001 From: stack72 Date: Mon, 9 Dec 2024 16:45:05 +0000 Subject: [PATCH] feat(sdf, dal): Adding the ability to set a webhook url for a workspace We currently only post to that webhook from the change set approval flow but we want to make this more of an opt-in to what you can / can't to --- .../components/WorkspaceIntegrationsModal.vue | 48 +++++++ .../layout/navbar/WorkspaceSettingsMenu.vue | 12 ++ app/web/src/store/feature_flags.store.ts | 1 + app/web/src/store/workspaces.store.ts | 56 +++++++- lib/dal/src/lib.rs | 1 + .../U3410__workspace_integration.sql | 11 ++ lib/dal/src/workspace.rs | 6 + lib/dal/src/workspace_integrations.rs | 126 ++++++++++++++++++ lib/sdf-server/src/service/v2.rs | 7 + lib/sdf-server/src/service/v2/change_set.rs | 47 ++++++- .../src/service/v2/change_set/apply.rs | 20 ++- .../src/service/v2/change_set/approve.rs | 15 ++- .../v2/change_set/cancel_approval_request.rs | 15 ++- .../src/service/v2/change_set/reject.rs | 15 ++- .../service/v2/change_set/request_approval.rs | 15 ++- lib/sdf-server/src/service/v2/integrations.rs | 42 ++++++ .../v2/integrations/get_integrations.rs | 27 ++++ .../v2/integrations/update_integration.rs | 45 +++++++ lib/si-id/src/lib.rs | 1 + 19 files changed, 496 insertions(+), 14 deletions(-) create mode 100644 app/web/src/components/WorkspaceIntegrationsModal.vue create mode 100644 lib/dal/src/migrations/U3410__workspace_integration.sql create mode 100644 lib/dal/src/workspace_integrations.rs create mode 100644 lib/sdf-server/src/service/v2/integrations.rs create mode 100644 lib/sdf-server/src/service/v2/integrations/get_integrations.rs create mode 100644 lib/sdf-server/src/service/v2/integrations/update_integration.rs diff --git a/app/web/src/components/WorkspaceIntegrationsModal.vue b/app/web/src/components/WorkspaceIntegrationsModal.vue new file mode 100644 index 0000000000..e0db06f15e --- /dev/null +++ b/app/web/src/components/WorkspaceIntegrationsModal.vue @@ -0,0 +1,48 @@ + + + diff --git a/app/web/src/components/layout/navbar/WorkspaceSettingsMenu.vue b/app/web/src/components/layout/navbar/WorkspaceSettingsMenu.vue index 10461dc6f8..efaf9c89ff 100644 --- a/app/web/src/components/layout/navbar/WorkspaceSettingsMenu.vue +++ b/app/web/src/components/layout/navbar/WorkspaceSettingsMenu.vue @@ -33,11 +33,18 @@ label="Copy Workspace Token" @click="copyWorkspaceToken" /> + +