Skip to content

Commit 5382bf2

Browse files
committed
.github/workflows/scripts/config-diff-post-comment.js: fix config check ok logic
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 <[email protected]>
1 parent 2dd02b5 commit 5382bf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/scripts/config-diff-post-comment.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ module.exports = async ({ github, context, core, configDiff }) => {
1414
);
1515

1616
// Check if any comment contains `/config check ok`
17-
const configCheckOkComment = comments.find(comment => comment.body.includes("/config check ok"));
17+
const configCheckOkComment = comments.find(
18+
comment => comment.body.includes("/config check ok") && !comment.body.includes("### Config Diff Tool Output")
19+
);
1820
if (configCheckOkComment) {
1921
core.info("Found '/config check ok' comment. Returning with success.");
2022
return;

0 commit comments

Comments
 (0)