From 48b0e12272d21f8982d34887146adc4bd5695ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=9B=E5=85=AE?= Date: Thu, 11 Jun 2026 23:31:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E9=BD=90=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=AE=A1=E8=AE=A1=E6=93=8D=E4=BD=9C=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/deploy-runs/deploy-runs.service.spec.ts | 11 ++++++++++- src/deploy-runs/deploy-runs.service.ts | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/deploy-runs/deploy-runs.service.spec.ts b/src/deploy-runs/deploy-runs.service.spec.ts index c1df7e3..f720aa3 100644 --- a/src/deploy-runs/deploy-runs.service.spec.ts +++ b/src/deploy-runs/deploy-runs.service.spec.ts @@ -311,7 +311,16 @@ describe('DeployRunsService', () => { expect(jenkins.cancelQueueItem).toHaveBeenCalledWith('queue_001'); expect(jenkins.stopBuild).not.toHaveBeenCalled(); expect(audit.record).toHaveBeenCalledWith( - expect.objectContaining({ action: 'DEPLOY_CANCELED' }), + expect.objectContaining({ + action: 'DEPLOY_CANCELED', + actorName: queuedRun.operator, + }), + ); + expect(audit.record).toHaveBeenCalledWith( + expect.objectContaining({ + action: 'DEPLOY_NOTIFICATION_SKIPPED', + actorName: queuedRun.operator, + }), ); }); diff --git a/src/deploy-runs/deploy-runs.service.ts b/src/deploy-runs/deploy-runs.service.ts index 205ebd5..7325cc3 100644 --- a/src/deploy-runs/deploy-runs.service.ts +++ b/src/deploy-runs/deploy-runs.service.ts @@ -119,6 +119,7 @@ export class DeployRunsService { action: 'DEPLOY_CANCELED', resourceType: 'deploy_run', resourceId: run.id, + actorName: run.operator, after: { status: run.status, jenkinsCancel, @@ -201,6 +202,7 @@ export class DeployRunsService { action: `DEPLOY_NOTIFICATION_${notification.status.toUpperCase()}`, resourceType: 'deploy_run', resourceId: run.id, + actorName: run.operator, after: { event, channel: notification.channel,