diff --git a/dist/blog-post-workflow.js b/dist/blog-post-workflow.js index 93ef867..7ce53be 100644 --- a/dist/blog-post-workflow.js +++ b/dist/blog-post-workflow.js @@ -13858,10 +13858,10 @@ var runWorkflow = async () => { if (result.status === "fulfilled") { core.info(runnerNameArray[index] + " runner succeeded. Post count: " + result.value.length); summaryTable.push([ - { data: `${runnerNameArray[index]}`, colspan: "6" }, - { data: ":white_check_mark:" }, - { data: `${result.value.length}` }, - { data: " Runner succeeded ", colspan: "6" } + { header: false, data: `${runnerNameArray[index]}`, colspan: "6" }, + { header: false, data: ":white_check_mark:" }, + { header: false, data: `${result.value.length}` }, + { header: false, data: " Runner succeeded ", colspan: "6" } ]); if (typeof feedNamesList[index] !== void 0 && feedNamesList[index]) { result.value = result.value.map((item2) => { @@ -13950,6 +13950,7 @@ var runWorkflow = async () => { changedReadmeCount = changedReadmeCount + 1; } }); + core.summary.addRaw(`### Summary`, true); if (changedReadmeCount > 0 && !SKIP_COMMITS) { if (!process.env.TEST_MODE) { await commitReadme(GITHUB_TOKEN, README_FILE_PATH_LIST).then(() => { @@ -13969,17 +13970,17 @@ var runWorkflow = async () => { true ); core.info(message.toString()); - core.summary.addRaw(`### Summary - ${message.toString()}`, true); - core.summary.addTable(summaryTable); - await core.summary.write(); } else { const noChangeMessage = "No change detected, skipping"; core.info(noChangeMessage); - core.summary.addRaw(`### Summary - ${noChangeMessage}`, true); - await core.summary.write(); } + core.summary.addRaw(`Blog posts fetched:`, true); + core.summary.addTable(summaryTable); + core.summary.addRaw(` +#### Posts written to readme: ${postsArray.length}`, true); + core.summary.addSeparator(); + core.summary.addDetails("Debug Info", "Some juicy info for devs: \n\n```json\n" + JSON.stringify(postsArray, null, 2) + "\n```\n\n"); + await core.summary.write(); process.exit(jobFailFlag ? 1 : 0); } } catch (e) { diff --git a/src/blog-post-workflow.js b/src/blog-post-workflow.js index d728dc5..6b12719 100644 --- a/src/blog-post-workflow.js +++ b/src/blog-post-workflow.js @@ -233,10 +233,10 @@ const runWorkflow = async () => { // Succeeded core.info(runnerNameArray[index] + ' runner succeeded. Post count: ' + result.value.length); summaryTable.push([ - {data: `${runnerNameArray[index]}`, colspan: '6'}, - {data: ':white_check_mark:'}, - {data: `${result.value.length}`}, - {data: ' Runner succeeded ', colspan: '6'}]); + {header: false, data: `${runnerNameArray[index]}`, colspan: '6'}, + {header: false, data: ':white_check_mark:'}, + {header: false, data: `${result.value.length}`}, + {header: false, data: ' Runner succeeded ', colspan: '6'}]); // Adds feed name to the items if (typeof feedNamesList[index] !== undefined && feedNamesList[index]) { result.value = result.value.map((item) => { @@ -362,6 +362,7 @@ const runWorkflow = async () => { changedReadmeCount = changedReadmeCount + 1; } }); + core.summary.addRaw(`### Summary`, true); if (changedReadmeCount > 0 && !SKIP_COMMITS) { if (!process.env.TEST_MODE) { @@ -376,19 +377,20 @@ const runWorkflow = async () => { if (!process.env.TEST_MODE && ENABLE_KEEPALIVE) { // Do dummy commit if elapsed time is greater than 50 days const committerUsername = core.getInput('committer_username'); - const committerEmail = core.getInput('committer_email'); - const message = await keepaliveWorkflow.KeepAliveWorkflow(GITHUB_TOKEN, committerUsername, committerEmail, + const committerEmail = core.getInput('committer_email'); + const message = await keepaliveWorkflow.KeepAliveWorkflow(GITHUB_TOKEN, committerUsername, committerEmail, core.getInput('dummy_commit_message'), 50, true); core.info(message.toString()); - core.summary.addRaw(`### Summary \n ${message.toString()}`, true); - core.summary.addTable(summaryTable); - await core.summary.write(); } else { const noChangeMessage = 'No change detected, skipping'; core.info(noChangeMessage); - core.summary.addRaw(`### Summary \n ${noChangeMessage}`, true); - await core.summary.write(); } + core.summary.addRaw(`Blog posts fetched:`, true); + core.summary.addTable(summaryTable); + core.summary.addRaw(`\n#### Posts written to readme: ${postsArray.length}`, true); + core.summary.addSeparator() + core.summary.addDetails('Debug Info', 'Some juicy info for devs: \n\n```json\n' + JSON.stringify(postsArray, null, 2) + '\n```\n\n'); + await core.summary.write(); process.exit(jobFailFlag ? 1 : 0); } } catch (e) {