From 4204f87ba716f60710e376230e3fd9795498a80c Mon Sep 17 00:00:00 2001 From: Naveen Naidu Date: Wed, 18 Jun 2025 22:05:04 +0530 Subject: [PATCH] .github/workflows/config-diff-post-comments.js: introduce "/config check ok" command Currently, we use the "Check ceph config" CI check to remind users about any configuration changes that were detected in the PR. There's no easy way for the script to detect if the relevant docuemtations has been updated for the config change that was detected. Users might get confused to still see the CI check failing even after updating the relevant docs. We update the text message to help diffuse the confusion. If the users will still like to see the CI check go green - they can comment `/config check ok` and re-run the failed test. Signed-off-by: Naveen Naidu --- .../workflows/scripts/config-diff-post-comment.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/config-diff-post-comment.js b/.github/workflows/scripts/config-diff-post-comment.js index f096d101b28b2..5e99bf8ae1650 100644 --- a/.github/workflows/scripts/config-diff-post-comment.js +++ b/.github/workflows/scripts/config-diff-post-comment.js @@ -13,6 +13,13 @@ module.exports = async ({ github, context, core, configDiff }) => { } ); + // Check if any comment contains `/config check ok` + const configCheckOkComment = comments.find(comment => comment.body.includes("/config check ok")); + if (configCheckOkComment) { + core.info("Found '/config check ok' comment. Returning with success."); + return; + } + const existingComment = comments.find(comment => comment.body.includes("### Config Diff Tool Output")); // Do not create comment if there are no configuration changes @@ -42,8 +49,8 @@ ${configDiff} \`\`\` -The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. - `; +The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. +Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment \`/config check ok\` and re-run the test. `; // List all files in the pull request core.info("Fetching list of files changed in the pull request..."); @@ -64,7 +71,7 @@ The above configuration changes are found in the PR. Please update the relevant core.info(`Annotating file: ${file.filename}`); // Show annotations only at the start of the file core.notice( - `Configuration changes detected in ${file.filename}. Please update the release documentation if necessary.`, + `Configuration changes detected in ${file.filename}. Please update the release documentation if necessary. Ignore if already done`, { title: "Configuration Change Detected", file: file.filename, -- 2.39.5