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,