Refactor approval URL construction in access and secret approval request services

- Updated the construction of approval URLs to use a consistent project path format.
- Modified notification payloads to include the new approval URL structure.
- Enhanced Slack message formatting to include buttons for viewing requests directly.
This commit is contained in:
Victor Santos
2025-11-07 11:29:16 -03:00
parent 0d1e9bbc04
commit 906de67f43
5 changed files with 77 additions and 32 deletions
@@ -399,7 +399,8 @@ export const accessApprovalRequestServiceFactory = ({
const requesterFullName = `${requestedByUser.firstName} ${requestedByUser.lastName}`;
const editorFullName = `${editedByUser.firstName} ${editedByUser.lastName}`;
const approvalPath = `/projects/secret-management/${project.id}/approval`;
const projectPath = `/projects/secret-management/${project.id}`;
const approvalPath = `${projectPath}/approval`;
const approvalUrl = `${cfg.SITE_URL}${approvalPath}`;
await triggerWorkflowIntegrationNotification({
@@ -417,7 +418,8 @@ export const accessApprovalRequestServiceFactory = ({
approvalUrl,
editNote,
editorEmail: editedByUser.email as string,
editorFullName
editorFullName,
projectPath
}
},
projectId: project.id