diff --git a/package.json b/package.json index 267a4cd17..28107d63f 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "cmd:backfill-completed-tasks": "tsx ./src/cmd/backfill-completed-tasks", "cmd:backfill-new-user-ids": "tsx ./src/cmd/backfill-new-user-ids", "cmd:normalize-filterOptions-assignee": "tsx ./src/cmd/normalize-filterOptions-assignee", - "cmd:backfill-company-id-in-client-notifications": "tsx ./src/cmd/backfill-company-id-in-client-notifications" + "cmd:backfill-company-id-in-client-notifications": "tsx ./src/cmd/backfill-company-id-in-client-notifications", + "cmd:post-deploy-m15": "tsx ./src/cmd/post-deploy-m15" }, "dependencies": { "@cyntler/react-doc-viewer": "^1.17.0", diff --git a/src/cmd/backfill-company-id-in-client-notifications/index.ts b/src/cmd/backfill-company-id-in-client-notifications/index.ts index 88441e814..55dafa275 100644 --- a/src/cmd/backfill-company-id-in-client-notifications/index.ts +++ b/src/cmd/backfill-company-id-in-client-notifications/index.ts @@ -80,7 +80,7 @@ const updateClientNotifications = async ( return { failedClientNotifications } } -const run = async () => { +export const backfillCompanyIdInClientNotifications = async () => { console.info(`backfill-company-id#run | Using clients endpoint:`, COPILOT_CLIENTS_ENDPOINT) const db = DBClient.getInstance() @@ -112,4 +112,4 @@ const run = async () => { console.info(`Failed update on clientNotifications (${failedClientNotifications.length})`, failedClientNotifications) } -run() +backfillCompanyIdInClientNotifications() diff --git a/src/cmd/post-deploy-m15/index.ts b/src/cmd/post-deploy-m15/index.ts new file mode 100644 index 000000000..80a9242fb --- /dev/null +++ b/src/cmd/post-deploy-m15/index.ts @@ -0,0 +1,15 @@ +import { backfillCompanyIdInClientNotifications } from '../backfill-company-id-in-client-notifications' +import { normalizeStringAssigneeToObject } from '../normalize-filterOptions-assignee' + +const run = async () => { + console.info('⚒️ Running normalize-filter-options script') + await normalizeStringAssigneeToObject() + console.info('🔥 Completed : normalize-filter-options script') + console.info('⚒️ Running script to backfill companyId in ClientNotifications') + await backfillCompanyIdInClientNotifications() + console.info('🔥 Completed : backfill companyId in ClientNotifications') + + //DO NOT FORGET to run trigger deploy action once milestone 15 has been promoted to production +} + +run()