diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index c2c0e1938f1c..09d7caf01972 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -15589,7 +15589,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 321e7bfa85ce..884b6664704a 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12367,7 +12367,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/checkAndroidStatus/index.js b/.github/actions/javascript/checkAndroidStatus/index.js index 3f55582f4d8d..a931693ffd9e 100644 --- a/.github/actions/javascript/checkAndroidStatus/index.js +++ b/.github/actions/javascript/checkAndroidStatus/index.js @@ -737110,7 +737110,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 64865a7d8a69..2784558fbd67 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -11634,7 +11634,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/checkSVGCompression/index.js b/.github/actions/javascript/checkSVGCompression/index.js index c1576688674f..e88674933578 100644 --- a/.github/actions/javascript/checkSVGCompression/index.js +++ b/.github/actions/javascript/checkSVGCompression/index.js @@ -20159,7 +20159,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index d2b103e6a585..680985a79d52 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -11855,7 +11855,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/formatCodeCovComment/index.js b/.github/actions/javascript/formatCodeCovComment/index.js index 88a5580d4e09..09aa763760f7 100644 --- a/.github/actions/javascript/formatCodeCovComment/index.js +++ b/.github/actions/javascript/formatCodeCovComment/index.js @@ -11821,7 +11821,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/getArtifactInfo/index.js b/.github/actions/javascript/getArtifactInfo/index.js index 3e828a4a654f..cc31072587dc 100644 --- a/.github/actions/javascript/getArtifactInfo/index.js +++ b/.github/actions/javascript/getArtifactInfo/index.js @@ -11595,7 +11595,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index eaa1cc82b493..3acf0d80147a 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -11781,7 +11781,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/getPreviousVersion/index.js b/.github/actions/javascript/getPreviousVersion/index.js index a8a629ec3bb1..baf9ae8c960f 100644 --- a/.github/actions/javascript/getPreviousVersion/index.js +++ b/.github/actions/javascript/getPreviousVersion/index.js @@ -11592,7 +11592,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 0e9b6f92d2d0..21b61c79450b 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -11724,7 +11724,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js index 9b9c334b8cb5..cc5f27429486 100644 --- a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js +++ b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js @@ -11826,7 +11826,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 8cc47a5f6fa3..a38570890192 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -11595,7 +11595,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 1e024921dc95..dbac1332f2aa 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -13047,7 +13047,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js index 58c881dc00dd..5f2b86314d98 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -11724,7 +11724,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/proposalPoliceComment/index.js b/.github/actions/javascript/proposalPoliceComment/index.js index 5756409e6cf9..80ee22dc686d 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -11614,9 +11614,9 @@ function getIsBotAuthor(user) { return false; } const knownBotLogins = [CONST_1.default.COMMENT.NAME_MELVIN_BOT, CONST_1.default.COMMENT.NAME_MELVIN_USER, CONST_1.default.COMMENT.NAME_CODEX, CONST_1.default.COMMENT.NAME_GITHUB_ACTIONS]; + const isKnownBotLogin = knownBotLogins.includes(user.login ?? ''); const isBotType = user.type === CONST_1.default.COMMENT.TYPE_BOT; - const isKnownLogin = knownBotLogins.includes(user.login ?? ''); - return isBotType || isKnownLogin; + return isKnownBotLogin || isBotType; } // Main function to process the workflow event async function run() { @@ -11664,6 +11664,10 @@ async function run() { const newProposalCreatedAt = new Date(payload.comment.created_at).getTime(); const newProposalBody = payload.comment.body; const newProposalAuthor = payload.comment.user.login; + if (getIsBotAuthor(payload.comment.user)) { + console.log('New comment is from a bot. Skipping duplicate check.'); + return; + } // Fetch all comments in the issue console.log('Get comments for issue #', issueNumber); const commentsResponse = await GithubUtils_1.default.getAllCommentDetails(issueNumber); @@ -11894,7 +11898,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts index 96dc79d61b6b..10b00b60b1a0 100644 --- a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts +++ b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts @@ -49,10 +49,10 @@ function getIsBotAuthor(user: {login?: string; type?: string} | null | undefined const knownBotLogins: string[] = [CONST.COMMENT.NAME_MELVIN_BOT, CONST.COMMENT.NAME_MELVIN_USER, CONST.COMMENT.NAME_CODEX, CONST.COMMENT.NAME_GITHUB_ACTIONS]; + const isKnownBotLogin = knownBotLogins.includes(user.login ?? ''); const isBotType = user.type === CONST.COMMENT.TYPE_BOT; - const isKnownLogin = knownBotLogins.includes(user.login ?? ''); - return isBotType || isKnownLogin; + return isKnownBotLogin || isBotType; } // Main function to process the workflow event @@ -111,6 +111,10 @@ async function run() { const newProposalCreatedAt = new Date(payload.comment.created_at).getTime(); const newProposalBody = payload.comment.body; const newProposalAuthor = payload.comment.user.login; + if (getIsBotAuthor(payload.comment.user)) { + console.log('New comment is from a bot. Skipping duplicate check.'); + return; + } // Fetch all comments in the issue console.log('Get comments for issue #', issueNumber); const commentsResponse = await GithubUtils.getAllCommentDetails(issueNumber); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 29c19ee6a1f6..6a435c0e7f6e 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -11605,7 +11605,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js index d6d46973166c..541981928362 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -11697,7 +11697,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 279ab76e98b4..f6b4cad4c305 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -11637,7 +11637,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/actions/javascript/waitForPreviousRuns/index.js b/.github/actions/javascript/waitForPreviousRuns/index.js index b734eee9f390..9d50eb439131 100644 --- a/.github/actions/javascript/waitForPreviousRuns/index.js +++ b/.github/actions/javascript/waitForPreviousRuns/index.js @@ -11646,7 +11646,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', diff --git a/.github/libs/CONST.ts b/.github/libs/CONST.ts index 5fabfda0d155..4a6b95d9b022 100644 --- a/.github/libs/CONST.ts +++ b/.github/libs/CONST.ts @@ -24,7 +24,7 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_BOT: 'melvin-bot[bot]', NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions',