From 8718bdfcef5ed83a92569ea517c82dbd33e19255 Mon Sep 17 00:00:00 2001 From: Arshad Mohammed <87503056+arshadparwaiz@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:54:08 -0800 Subject: [PATCH] [Prod Release] MWPW-164198 - CC Graybox promote (#45) --- actions/graybox/initiate-promote-worker.js | 3 ++- actions/graybox/preview-worker.js | 4 ++-- actions/helixUtils.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/actions/graybox/initiate-promote-worker.js b/actions/graybox/initiate-promote-worker.js index cf91884..71c7612 100644 --- a/actions/graybox/initiate-promote-worker.js +++ b/actions/graybox/initiate-promote-worker.js @@ -41,7 +41,7 @@ async function main(params) { const appConfig = new AppConfig(params); const { - adminPageUri, rootFolder, gbRootFolder, promoteIgnorePaths, experienceName, projectExcelPath, draftsOnly + driveId, adminPageUri, rootFolder, gbRootFolder, promoteIgnorePaths, experienceName, projectExcelPath, draftsOnly } = appConfig.getPayload(); const filesWrapper = await initFilesWrapper(logger); @@ -105,6 +105,7 @@ async function main(params) { await Promise.all(writeBatchJsonPromises); const inputParams = {}; + inputParams.driveId = driveId; inputParams.rootFolder = rootFolder; inputParams.gbRootFolder = gbRootFolder; inputParams.projectExcelPath = projectExcelPath; diff --git a/actions/graybox/preview-worker.js b/actions/graybox/preview-worker.js index 3bdf075..609872a 100644 --- a/actions/graybox/preview-worker.js +++ b/actions/graybox/preview-worker.js @@ -49,9 +49,9 @@ async function main(params) { try { let excelValues = ''; if (projectStatusJson.status === 'initiated') { - excelValues = [['Initial Preview of Graybox completed', toUTCStr(new Date()), `Initial Preview started for '${experienceName}' experience`]]; + excelValues = [[`Initial Preview started for '${experienceName}' experience`, toUTCStr(new Date()), '']]; } else if (projectStatusJson.status === 'promoted') { - excelValues = [['Final Preview of Promoted Content completed', toUTCStr(new Date()), `Final Preview started for promoted content of '${experienceName}' experience`]]; + excelValues = [[`Final Preview started for promoted content of '${experienceName}' experience`, toUTCStr(new Date()), '']]; } // Update Preview Status await sharepoint.updateExcelTable(projectExcelPath, 'PROMOTE_STATUS', excelValues); diff --git a/actions/helixUtils.js b/actions/helixUtils.js index 0a9d90e..2921298 100644 --- a/actions/helixUtils.js +++ b/actions/helixUtils.js @@ -84,7 +84,7 @@ class HelixUtils { const repo = this.getRepo(isGraybox); const urlInfo = this.appConfig.getUrlInfo(); let experienceName = grayboxExperienceName || ''; - experienceName = experienceName ? `${experienceName}/` : ''; + experienceName = isGraybox ? `${experienceName}/` : ''; const bulkUrl = `https://admin.hlx.page/${operation}/${urlInfo.getOwner()}/${repo}/${urlInfo.getBranch()}/${experienceName}*`; const options = {