Skip to content

Commit 78c3ca4

Browse files
authored
Arc 2643 audit log table entry (#2585)
ARC-2643 Formate the entityAction type for deployment flow
1 parent 635b2d9 commit 78c3ca4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/jira/client/jira-client-audit-log-helper.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ describe("processDeploySubmitResp", () => {
924924
auditInfo: [
925925
{
926926
createdAt: expect.anything(),
927-
entityAction: "successful",
927+
entityAction: "SUCCESSFUL",
928928
entityId: "react-code-hub_1194529862",
929929
entityType: "deployments",
930930
issueKey: "KAM-6",
@@ -1004,7 +1004,7 @@ describe("processDeploySubmitResp", () => {
10041004
auditInfo: [
10051005
{
10061006
createdAt: expect.anything(),
1007-
entityAction: "successful",
1007+
entityAction: "SUCCESSFUL",
10081008
entityId: "react-code-hub_1194529862",
10091009
entityType: "deployments",
10101010
issueKey: "KAM-6",
@@ -1013,7 +1013,7 @@ describe("processDeploySubmitResp", () => {
10131013
},
10141014
{
10151015
createdAt: expect.anything(),
1016-
entityAction: "successful",
1016+
entityAction: "SUCCESSFUL",
10171017
entityId: "react-code-hub_1194529862",
10181018
entityType: "deployments",
10191019
issueKey: "KAM-5",

src/jira/client/jira-client-audit-log-helper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const processDeploySubmitResp = ({
141141
issueKey,
142142
subscriptionId: options.subscriptionId,
143143
source: options.auditLogsource || "WEBHOOK",
144-
entityAction: reqDeploymentData.state
144+
entityAction: (reqDeploymentData.state || "").toUpperCase()
145145
};
146146
if (obj.subscriptionId && obj.entityId) {
147147
auditInfo.push(obj);
@@ -219,6 +219,7 @@ export const processWorkflowSubmitResp = ({
219219
return { isSuccess: false };
220220
}
221221
};
222+
222223
export const processAuditLogsForDevInfoBulkUpdate = ({ reqRepoData, response, options, logger }) => {
223224
try {
224225
const { isSuccess, auditInfo } = processBatchedBulkUpdateResp({

0 commit comments

Comments
 (0)