]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
.github/workflows/config-diff-post-comments.js: introduce "/config check ok" command 64015/head
authorNaveen Naidu <naveennaidu479@gmail.com>
Wed, 18 Jun 2025 16:35:04 +0000 (22:05 +0530)
committerNaveen Naidu <naveennaidu479@gmail.com>
Thu, 19 Jun 2025 03:34:38 +0000 (09:04 +0530)
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 <naveennaidu479@gmail.com>
.github/workflows/scripts/config-diff-post-comment.js

index f096d101b28b2e6d41ddafc4eed337b48d046b0d..5e99bf8ae1650ba60c8082c46a2352219330ff37 100644 (file)
@@ -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,