fix: 补齐取消发布审计操作者
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user