Skip to content

Commit

Permalink
[Prod Release] MWPW-164198 - CC Graybox promote (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
arshadparwaiz authored Jan 6, 2025
1 parent 3507a1b commit 8718bdf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion actions/graybox/initiate-promote-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions actions/graybox/preview-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion actions/helixUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8718bdf

Please sign in to comment.