]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
.github/workflows/scripts/config-diff-post-comment.js: fix config check ok logic 64296/head
authorNaveen Naidu <naveennaidu479@gmail.com>
Wed, 2 Jul 2025 04:52:02 +0000 (10:22 +0530)
committerNaveen Naidu <naveennaidu479@gmail.com>
Wed, 2 Jul 2025 04:52:02 +0000 (10:22 +0530)
currently, whenever a "config diff tool output" comment is created it
also has the string `/config check ok` string in it. The next time the
test run it see's this text and assumes that the user has commented it.
We fix the logic to makes sure that we ignore such cases.

Signed-off-by: Naveen Naidu <naveennaidu479@gmail.com>
.github/workflows/scripts/config-diff-post-comment.js

index 5e99bf8ae1650ba60c8082c46a2352219330ff37..3326f27cb7b98bd6406279c958bd1f09daeb2976 100644 (file)
@@ -14,7 +14,9 @@ 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"));
+    const configCheckOkComment = comments.find(
+      comment => comment.body.includes("/config check ok") && !comment.body.includes("### Config Diff Tool Output")
+    );
     if (configCheckOkComment) {
       core.info("Found '/config check ok' comment. Returning with success.");
       return;