Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: add task run status update to project webhook (#7710)
p0ny6b6ad4c02dfd
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.goindex 1bb186ecb9..a7120a6f10 100644--- a/backend/api/v1/project_service.go+++ b/backend/api/v1/project_service.go@@ -2238,6 +2238,8 @@ func convertToActivityTypeStrings(types []v1pb.Activity_Type) ([]string, error)result = append(result, string(api.ActivityPipelineStageStatusUpdate))case v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE:result = append(result, string(api.ActivityPipelineTaskStatusUpdate))+ case v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE:+ result = append(result, string(api.ActivityPipelineTaskRunStatusUpdate))case v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT:result = append(result, string(api.ActivityPipelineTaskFileCommit))case v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE:@@ -2289,6 +2291,8 @@ func convertNotificationTypeStrings(types []string) []v1pb.Activity_Type {result = append(result, v1pb.Activity_TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE)case string(api.ActivityPipelineTaskStatusUpdate):result = append(result, v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE)+ case string(api.ActivityPipelineTaskRunStatusUpdate):+ result = append(result, v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE)case string(api.ActivityPipelineTaskFileCommit):result = append(result, v1pb.Activity_TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT)case string(api.ActivityPipelineTaskStatementUpdate):diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex a11ec31c96..5b63799c8e 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1529,6 +1529,10 @@"issue-approval-notify": {"title": "Issue approval needed","label": "When issue is pending approval"+ },+ "issue-task-run-status-change": {+ "title": "Issue task run status change",+ "label": "When issue task run status has changed"}}},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 3c005e2130..e71a51d63b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1526,6 +1526,10 @@"issue-approval-notify": {"title": "Notificación de aprobación de incidencia","label": "Cuando se aprueba o rechaza una incidencia"+ },+ "issue-task-run-status-change": {+ "title": "Cambio de estado de ejecución de tarea de incidencia",+ "label": "Cuando cambia el estado de la ejecución de la tarea que encierra la incidencia"}}},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 102db9579c..b3c1a7f11a 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1523,6 +1523,10 @@"issue-approval-notify": {"title": "工单待审批","label": "当工单需要审批"+ },+ "issue-task-run-status-change": {+ "title": "工单任务执行状态变更",+ "label": "当一个工单包含的任务执行状态发生了变更"}}},diff --git a/frontend/src/types/activity.ts b/frontend/src/types/activity.tsindex fbba401266..bcac1eb6fd 100644--- a/frontend/src/types/activity.ts+++ b/frontend/src/types/activity.ts@@ -35,6 +35,8 @@ export function activityName(action: LogEntity_Action): string {return t("activity.type.pipeline-stage-status-update");case LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE:return t("activity.type.pipeline-task-status-update");+ case LogEntity_Action.ACTION_PIPELINE_TASK_RUN_STATUS_UPDATE:+ return t("activity.type.pipeline-task-run-status-update");case LogEntity_Action.ACTION_PIPELINE_TASK_FILE_COMMIT:return t("activity.type.pipeline-task-file-commit");case LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE:diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.tsindex f3f96ce15c..27e01e12ff 100644--- a/frontend/src/types/proto/v1/project_service.ts+++ b/frontend/src/types/proto/v1/project_service.ts@@ -753,6 +753,8 @@ export enum Activity_Type {TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE = 5,/** TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE - TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now. */TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE = 6,+ /** TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE - TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. */+ TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE = 22,/** TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT - TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT represents the VCS trigger to commit a file to update the task statement. */TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT = 7,/** TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE - TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement. */@@ -822,6 +824,9 @@ export function activity_TypeFromJSON(object: any): Activity_Type {case 6:case "TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE":return Activity_Type.TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE;+ case 22:+ case "TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE":+ return Activity_Type.TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE;case 7:case "TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT":return Activity_Type.TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT;@@ -886,6 +891,8 @@ export function activity_TypeToJSON(object: Activity_Type): string {return "TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE";case Activity_Type.TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE:return "TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE";+ case Activity_Type.TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE:+ return "TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE";case Activity_Type.TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT:return "TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT";case Activity_Type.TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE:diff --git a/frontend/src/types/v1/projectWebhook.ts b/frontend/src/types/v1/projectWebhook.tsindex d69c81ea03..7bdc214977 100644--- a/frontend/src/types/v1/projectWebhook.ts+++ b/frontend/src/types/v1/projectWebhook.ts@@ -100,6 +100,15 @@ export const projectWebhookV1ActivityItemList =),activity: Activity_Type.TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE,},+ {+ title: t(+ "project.webhook.activity-item.issue-task-run-status-change.title"+ ),+ label: t(+ "project.webhook.activity-item.issue-task-run-status-change.label"+ ),+ activity: Activity_Type.TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE,+ },{title: t("project.webhook.activity-item.issue-info-change.title"),label: t("project.webhook.activity-item.issue-info-change.label"),diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 049d968872..568470a18f 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -6612,6 +6612,7 @@ TYPE_ISSUE_CREATE represents creating an issue. || TYPE_ISSUE_APPROVAL_NOTIFY | 21 | TYPE_ISSUE_APPROVAL_NOTIFY is the type for notifying issue approval. || TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE | 5 | TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE represents the pipeline stage status change, including BEGIN, END for now. || TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE | 6 | TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now. |+| TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE | 22 | TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED. || TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT | 7 | TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT represents the VCS trigger to commit a file to update the task statement. || TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE | 8 | TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement. || TYPE_ISSUE_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE | 9 | TYPE_ISSUE_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE represents the manual update of the task earliest allowed time. |diff --git a/proto/generated-go/v1/project_service.pb.go b/proto/generated-go/v1/project_service.pb.goindex 11d737bd1b..b9cfc58518 100644--- a/proto/generated-go/v1/project_service.pb.go+++ b/proto/generated-go/v1/project_service.pb.go@@ -511,6 +511,8 @@ const (Activity_TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE Activity_Type = 5// TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now.Activity_TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE Activity_Type = 6+ // TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.+ Activity_TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE Activity_Type = 22// TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT represents the VCS trigger to commit a file to update the task statement.Activity_TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT Activity_Type = 7// TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement.@@ -556,6 +558,7 @@ var (21: "TYPE_ISSUE_APPROVAL_NOTIFY",5: "TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE",6: "TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE",+ 22: "TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE",7: "TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT",8: "TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE",9: "TYPE_ISSUE_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE",@@ -579,6 +582,7 @@ var ("TYPE_ISSUE_APPROVAL_NOTIFY": 21,"TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE": 5,"TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE": 6,+ "TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE": 22,"TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT": 7,"TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE": 8,"TYPE_ISSUE_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE": 9,@@ -3961,8 +3965,8 @@ var file_v1_project_service_proto_rawDesc = []byte{0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70,0x65, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x76,0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c,- 0x75, 0x65, 0x73, 0x22, 0xd9, 0x05, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,- 0x22, 0xcc, 0x05, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50,+ 0x75, 0x65, 0x73, 0x22, 0x89, 0x06, 0x0a, 0x08, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,+ 0x22, 0xfc, 0x05, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50,0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x43, 0x52,0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49,@@ -3978,7 +3982,10 @@ var file_v1_project_service_proto_rawDesc = []byte{0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x05, 0x12, 0x2a, 0x0a,0x26, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x50, 0x49, 0x50, 0x45,0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,- 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x06, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x59, 0x50,+ 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x59, 0x50,+ 0x45, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45,+ 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,+ 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x16, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x59, 0x50,0x45, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45,0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49,0x54, 0x10, 0x07, 0x12, 0x2d, 0x0a, 0x29, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x53, 0x53, 0x55,diff --git a/proto/v1/project_service.proto b/proto/v1/project_service.protoindex 58d0fa3bd5..cf73c74c52 100644--- a/proto/v1/project_service.proto+++ b/proto/v1/project_service.proto@@ -569,6 +569,8 @@ message Activity {TYPE_ISSUE_PIPELINE_STAGE_STATUS_UPDATE = 5;// TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE represents the pipeline task status change, including PENDING, PENDING_APPROVAL, RUNNING, SUCCESS, FAILURE, CANCELED for now.TYPE_ISSUE_PIPELINE_TASK_STATUS_UPDATE = 6;+ // TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE represents the pipeline task run status change, including PENDING, RUNNING, DONE, FAILED, CANCELED.+ TYPE_ISSUE_PIPELINE_TASK_RUN_STATUS_UPDATE = 22;// TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT represents the VCS trigger to commit a file to update the task statement.TYPE_ISSUE_PIPELINE_TASK_FILE_COMMIT = 7;// TYPE_ISSUE_PIPELINE_TASK_STATEMENT_UPDATE represents the manual update of the task statement.