Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: revert "chore: remove unused (#12149)" (#12152)

p0nyb9987ef89e20
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index fb1bfa4922..dd0d1da706 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -693,6 +693,8 @@ func (s *ProjectService) TestWebhook(ctx context.Context, request *v1pb.TestWebh
Issue: &webhookplugin.Issue{
ID: 1,
Name: "Test issue",
+ Status: "OPEN",
+ Type: "bb.issue.database.create",
Description: "This is a test issue",
},
Project: &webhookplugin.Project{Name: project.Title},
diff --git a/backend/component/webhook/manager.go b/backend/component/webhook/manager.go
index 1ad8a59328..3eba7fa2ff 100644
--- a/backend/component/webhook/manager.go
+++ b/backend/component/webhook/manager.go
@@ -77,9 +77,12 @@ func (m *Manager) BatchCreateActivitiesForRunTasks(ctx context.Context, issue *s
Issue: &webhook.Issue{
ID: issue.UID,
Name: issue.Title,
+ Status: string(issue.Status),
+ Type: string(issue.Type),
Description: issue.Description,
},
Project: &webhook.Project{
+ ID: issue.Project.UID,
Name: issue.Project.Title,
},
Description: comment,
@@ -127,9 +130,12 @@ func (m *Manager) BatchCreateActivitiesForSkipTasks(ctx context.Context, issue *
Issue: &webhook.Issue{
ID: issue.UID,
Name: issue.Title,
+ Status: string(issue.Status),
+ Type: string(issue.Type),
Description: issue.Description,
},
Project: &webhook.Project{
+ ID: issue.Project.UID,
Name: issue.Project.Title,
},
Description: comment,
@@ -178,9 +184,12 @@ func (m *Manager) BatchCreateActivitiesForCancelTaskRuns(ctx context.Context, is
Issue: &webhook.Issue{
ID: issue.UID,
Name: issue.Title,
+ Status: string(issue.Status),
+ Type: string(issue.Type),
Description: issue.Description,
},
Project: &webhook.Project{
+ ID: issue.Project.UID,
Name: issue.Project.Title,
},
Description: comment,
@@ -637,9 +646,12 @@ func (m *Manager) getWebhookContext(ctx context.Context, activity *store.Activit
Issue: &webhook.Issue{
ID: meta.Issue.UID,
Name: meta.Issue.Title,
+ Status: string(meta.Issue.Status),
+ Type: string(meta.Issue.Type),
Description: meta.Issue.Description,
},
Project: &webhook.Project{
+ ID: meta.Issue.Project.UID,
Name: meta.Issue.Project.Title,
},
TaskResult: webhookTaskResult,
diff --git a/backend/plugin/webhook/webhook.go b/backend/plugin/webhook/webhook.go
index 1a0f3f8c15..3c9783a98f 100644
--- a/backend/plugin/webhook/webhook.go
+++ b/backend/plugin/webhook/webhook.go
@@ -41,6 +41,8 @@ const (
type Issue struct {
ID int `json:"id"`
Name string `json:"name"`
+ Status string `json:"status"`
+ Type string `json:"type"`
Description string `json:"description"`
}
@@ -56,6 +58,7 @@ type TaskResult struct {
// Project object of project.
type Project struct {
+ ID int `json:"id"`
Name string `json:"name"`
}