Skip to content

Commit 0c95e42

Browse files
authored
Merge pull request ceph#64015 from Naveenaidu/wip-naveen-introduce-config-ok-command
.github/workflows/config-diff-post-comments.js: introduce "/config check ok" command
2 parents 479dc16 + 4204f87 commit 0c95e42

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ module.exports = async ({ github, context, core, configDiff }) => {
1313
}
1414
);
1515

16+
// Check if any comment contains `/config check ok`
17+
const configCheckOkComment = comments.find(comment => comment.body.includes("/config check ok"));
18+
if (configCheckOkComment) {
19+
core.info("Found '/config check ok' comment. Returning with success.");
20+
return;
21+
}
22+
1623
const existingComment = comments.find(comment => comment.body.includes("### Config Diff Tool Output"));
1724

1825
// Do not create comment if there are no configuration changes
@@ -42,8 +49,8 @@ ${configDiff}
4249
\`\`\`
4350
4451
45-
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
46-
`;
52+
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
53+
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. `;
4754

4855
// List all files in the pull request
4956
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
6471
core.info(`Annotating file: ${file.filename}`);
6572
// Show annotations only at the start of the file
6673
core.notice(
67-
`Configuration changes detected in ${file.filename}. Please update the release documentation if necessary.`,
74+
`Configuration changes detected in ${file.filename}. Please update the release documentation if necessary. Ignore if already done`,
6875
{
6976
title: "Configuration Change Detected",
7077
file: file.filename,

0 commit comments

Comments
 (0)