From f91f09c163157d15a2aa4b2c75cefddf978d61b8 Mon Sep 17 00:00:00 2001 From: ldraney Date: Wed, 8 May 2024 15:55:17 -0600 Subject: [PATCH] updated for additional clarification in comments --- .github/scripts/actionUtils.js | 3 +++ .github/scripts/createAndPostTag.js | 3 ++- .github/scripts/prData.js | 2 +- .github/scripts/preTagSummary.js | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/scripts/actionUtils.js b/.github/scripts/actionUtils.js index 285765cd79..39f547391b 100644 --- a/.github/scripts/actionUtils.js +++ b/.github/scripts/actionUtils.js @@ -6,6 +6,9 @@ const fs = require("fs"); // NodeJs module provides an API for interacting with * This function is designed to be reused across different modules or scripts. * * @param {string} summaryContent The content to append to the GitHub step summary. + * @returns {Promise} A Promise that resolves with no value (undefined) if the append operation succeeds, + * or rejects if an error occurs during the append operation. + * */ async function appendSummary(summaryContent) { try { diff --git a/.github/scripts/createAndPostTag.js b/.github/scripts/createAndPostTag.js index c79beee54e..50261ce290 100644 --- a/.github/scripts/createAndPostTag.js +++ b/.github/scripts/createAndPostTag.js @@ -10,7 +10,8 @@ const appendSummary = require("./actionUtils"); * @param {string} repo The repository name. * @param {string} newVersion The new version for the tag. * @param {string} sha The SHA of the commit to tag. - * @async + * @returns {Promise} A Promise that resolves when the tag is successfully created and pushed, + * or rejects if an error occurs. */ async function createTag(github, owner, repo, newVersion, sha) { const tagName = `${newVersion}`; diff --git a/.github/scripts/prData.js b/.github/scripts/prData.js index a1b62a71c2..04c83016d4 100644 --- a/.github/scripts/prData.js +++ b/.github/scripts/prData.js @@ -97,7 +97,7 @@ function processLabelsAndVersion(labels, currentVersion) { /** * Main function to handle pull request data for a GitHub repository. * @param {Object} params - Parameters including GitHub client and context. - * @returns {Object|null} - An object containing pull request processing results or null in case of error. + * @returns {Promise} - An object containing pull request processing results or null in case of error. */ async function prData(params) { const { github, context, core } = params; diff --git a/.github/scripts/preTagSummary.js b/.github/scripts/preTagSummary.js index 70af2b0a08..b3fc4588ee 100644 --- a/.github/scripts/preTagSummary.js +++ b/.github/scripts/preTagSummary.js @@ -12,6 +12,8 @@ const appendSummary = require("./actionUtils"); * @param {object} github - The GitHub context object, providing context like repo and owner. * @param {object} context - The GitHub context object with additional pull request information. * @param {object} core - The GitHub core library, used for setting action failure messages. + * @returns {Promise} A Promise that resolves when the summary has been successfully appended, + * or rejects if an error occurs during the operation. */ async function preTagSummary(params) { const { github, context, core } = params;