fix: 补齐取消发布审计操作者

This commit is contained in:
湛兮
2026-06-11 23:31:01 +08:00
parent 6ce1543a0a
commit 48b0e12272
2 changed files with 12 additions and 1 deletions
+10 -1
View File
@@ -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,
}),
);
});
+2
View File
@@ -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,