From 08bdff7362ed9f03bbb08e343a5a8d91f4bcdaed Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Wed, 18 Feb 2026 12:22:46 -0800 Subject: [PATCH 1/6] fix: melvinbot follow-up --- .../javascript/proposalPoliceComment/proposalPoliceComment.ts | 3 ++- .github/libs/CONST.ts | 3 ++- Mobile-Expensify | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts index bfed50125855..54129d24aa56 100644 --- a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts +++ b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts @@ -103,7 +103,8 @@ async function run() { continue; } const isAuthorBot = - previousProposal.user?.login === CONST.COMMENT.NAME_MELVIN || + previousProposal.user?.login === CONST.COMMENT.NAME_MELVIN_A || + previousProposal.user?.login === CONST.COMMENT.NAME_MELVIN_B || previousProposal.user?.login === CONST.COMMENT.NAME_CODEX || previousProposal.user?.login === CONST.COMMENT.NAME_GITHUB_ACTIONS || previousProposal.user?.type === CONST.COMMENT.TYPE_BOT; diff --git a/.github/libs/CONST.ts b/.github/libs/CONST.ts index 72a5fb81f88b..2cd4a0679605 100644 --- a/.github/libs/CONST.ts +++ b/.github/libs/CONST.ts @@ -24,7 +24,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', }, diff --git a/Mobile-Expensify b/Mobile-Expensify index 3498e819332d..4bc3e4c0d8b8 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 3498e819332d20d88e42294d43c6a88b2fbe5ad8 +Subproject commit 4bc3e4c0d8b8e2b5f68c1fb889d2d397e1e5264c From 3407e8e1dde6366bca6ca151cd3cab5513147db4 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Wed, 18 Feb 2026 12:33:06 -0800 Subject: [PATCH 2/6] chore: gh-actions-build --- .github/actions/javascript/authorChecklist/index.js | 3 ++- .github/actions/javascript/awaitStagingDeploys/index.js | 3 ++- .github/actions/javascript/checkAndroidStatus/index.js | 3 ++- .github/actions/javascript/checkDeployBlockers/index.js | 3 ++- .github/actions/javascript/checkSVGCompression/index.js | 3 ++- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 3 ++- .github/actions/javascript/formatCodeCovComment/index.js | 3 ++- .github/actions/javascript/getArtifactInfo/index.js | 3 ++- .../actions/javascript/getDeployPullRequestList/index.js | 3 ++- .github/actions/javascript/getPreviousVersion/index.js | 3 ++- .github/actions/javascript/getPullRequestDetails/index.js | 3 ++- .../javascript/getPullRequestIncrementalChanges/index.js | 3 ++- .github/actions/javascript/isStagingDeployLocked/index.js | 3 ++- .../actions/javascript/markPullRequestsAsDeployed/index.js | 3 ++- .github/actions/javascript/postTestBuildComment/index.js | 3 ++- .github/actions/javascript/proposalPoliceComment/index.js | 6 ++++-- .github/actions/javascript/reopenIssueWithComment/index.js | 3 ++- .github/actions/javascript/reviewerChecklist/index.js | 3 ++- .github/actions/javascript/verifySignedCommits/index.js | 3 ++- .github/actions/javascript/waitForPreviousRuns/index.js | 3 ++- 20 files changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index bcc9bc10e2e8..54d6701c3890 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -15589,7 +15589,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 39db55e4852b..0a18a88f8aed 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12367,7 +12367,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 6fb6d18f1257..48c833083fe0 100644 --- a/.github/actions/javascript/checkAndroidStatus/index.js +++ b/.github/actions/javascript/checkAndroidStatus/index.js @@ -737110,7 +737110,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 b96e89e03d6e..78727f9d7af8 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -11634,7 +11634,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 66a16dcf348f..b7ebd4a66b60 100644 --- a/.github/actions/javascript/checkSVGCompression/index.js +++ b/.github/actions/javascript/checkSVGCompression/index.js @@ -20159,7 +20159,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 9938e6b49f98..d9fbbee4cef0 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -11762,7 +11762,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 9d9e9ac17ba4..0f2f3f7f1316 100644 --- a/.github/actions/javascript/formatCodeCovComment/index.js +++ b/.github/actions/javascript/formatCodeCovComment/index.js @@ -11821,7 +11821,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 7dea39a02f6b..413847e5a7dc 100644 --- a/.github/actions/javascript/getArtifactInfo/index.js +++ b/.github/actions/javascript/getArtifactInfo/index.js @@ -11595,7 +11595,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 dbb74d63335a..593a5ff8cd01 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -11781,7 +11781,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 bb994584190c..40f286d19993 100644 --- a/.github/actions/javascript/getPreviousVersion/index.js +++ b/.github/actions/javascript/getPreviousVersion/index.js @@ -11592,7 +11592,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 e2c175318e87..2ef9948aeed4 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -11724,7 +11724,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 d5ff389c19ff..793d9a71bc4b 100644 --- a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js +++ b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js @@ -11826,7 +11826,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 def8a7c76de1..1b8da581d368 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -11595,7 +11595,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 e2998f1c2453..378dca07eacb 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -13047,7 +13047,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 517231a20b5c..2004cbe2b51f 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -11724,7 +11724,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 19baf05e4618..c9994a2fbc3a 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -11659,7 +11659,8 @@ async function run() { if (!isProposal || previousProposalCreatedAt >= newProposalCreatedAt) { continue; } - const isAuthorBot = previousProposal.user?.login === CONST_1.default.COMMENT.NAME_MELVIN || + const isAuthorBot = previousProposal.user?.login === CONST_1.default.COMMENT.NAME_MELVIN_A || + previousProposal.user?.login === CONST_1.default.COMMENT.NAME_MELVIN_B || previousProposal.user?.login === CONST_1.default.COMMENT.NAME_CODEX || previousProposal.user?.login === CONST_1.default.COMMENT.NAME_GITHUB_ACTIONS || previousProposal.user?.type === CONST_1.default.COMMENT.TYPE_BOT; @@ -11871,7 +11872,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', }, diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 2f5e484164a7..5ce5813831b0 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -11605,7 +11605,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 088dde7e1b94..d1c10be9f76a 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -11697,7 +11697,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 8a36130573d4..87d675b2996d 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -11637,7 +11637,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: '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 d1ac03f336ec..93eb670cd926 100644 --- a/.github/actions/javascript/waitForPreviousRuns/index.js +++ b/.github/actions/javascript/waitForPreviousRuns/index.js @@ -11646,7 +11646,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN: 'melvin-bot', + NAME_MELVIN_A: 'melvin-bot', + NAME_MELVIN_B: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', }, From de87ca7172cce50b9b292d2536f3f5129b3eef20 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Wed, 18 Feb 2026 12:34:45 -0800 Subject: [PATCH 3/6] chore: submodule sync --- Mobile-Expensify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 4bc3e4c0d8b8..3498e819332d 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 4bc3e4c0d8b8e2b5f68c1fb889d2d397e1e5264c +Subproject commit 3498e819332d20d88e42294d43c6a88b2fbe5ad8 From ec1fe24d4be94c59a1c08190d687f93052db8311 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Wed, 18 Feb 2026 18:43:20 -0800 Subject: [PATCH 4/6] fix: duplicate proposal guard clause --- .../javascript/proposalPoliceComment/index.js | 38 +++++++++++---- .../proposalPoliceComment.ts | 46 +++++++++++++++---- 2 files changed, 67 insertions(+), 17 deletions(-) diff --git a/.github/actions/javascript/proposalPoliceComment/index.js b/.github/actions/javascript/proposalPoliceComment/index.js index c9994a2fbc3a..db38399630d7 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -11596,6 +11596,28 @@ function isCommentCreatedEvent(payload) { function isCommentEditedEvent(payload) { return payload.action === CONST_1.default.ACTIONS.EDITED; } +/** + * Checks if a comment body matches the criteria for a Proposal. + */ +function getIsProposal(body) { + if (!body) { + return false; + } + const lowerCaseBody = body.toLowerCase(); + return body.includes(CONST_1.default.PROPOSAL_KEYWORD) && lowerCaseBody.includes(CONST_1.default.PROPOSAL_HEADER_A) && lowerCaseBody.includes(CONST_1.default.PROPOSAL_HEADER_B); +} +/** + * Determines if a comment author is a known bot or a bot-type account. + */ +function getIsBotAuthor(user) { + if (!user) { + return false; + } + const knownBotLogins = [CONST_1.default.COMMENT.NAME_MELVIN_A, CONST_1.default.COMMENT.NAME_MELVIN_B, CONST_1.default.COMMENT.NAME_CODEX, CONST_1.default.COMMENT.NAME_GITHUB_ACTIONS]; + const isBotType = user.type === CONST_1.default.COMMENT.TYPE_BOT; + const isKnownLogin = knownBotLogins.includes(user.login ?? ''); + return isBotType || isKnownLogin; +} // Main function to process the workflow event async function run() { // Capture the timestamp immediately at the start of the run @@ -11650,22 +11672,22 @@ async function run() { core.endGroup(); let didFindDuplicate = false; let originalProposal; + const isNewCommentAProposal = getIsProposal(newProposalBody); + if (!isNewCommentAProposal) { + console.log('New comment is not a proposal. Skipping duplicate check.'); + return; + } for (const previousProposal of commentsResponse) { const body = previousProposal.body ?? ''; - const lowerCaseBody = body.toLowerCase() ?? ''; - const isProposal = !!body.includes(CONST_1.default.PROPOSAL_KEYWORD) && !!lowerCaseBody.includes(CONST_1.default.PROPOSAL_HEADER_A) && !!lowerCaseBody.includes(CONST_1.default.PROPOSAL_HEADER_B); + const isProposal = getIsProposal(body); const previousProposalCreatedAt = new Date(previousProposal.created_at).getTime(); // Early continue if not a proposal or previous comment is newer than current one if (!isProposal || previousProposalCreatedAt >= newProposalCreatedAt) { continue; } - const isAuthorBot = previousProposal.user?.login === CONST_1.default.COMMENT.NAME_MELVIN_A || - previousProposal.user?.login === CONST_1.default.COMMENT.NAME_MELVIN_B || - previousProposal.user?.login === CONST_1.default.COMMENT.NAME_CODEX || - previousProposal.user?.login === CONST_1.default.COMMENT.NAME_GITHUB_ACTIONS || - previousProposal.user?.type === CONST_1.default.COMMENT.TYPE_BOT; + const isBotAuthor = getIsBotAuthor(previousProposal.user); // Skip prompting if comment author is the GH bot - if (isAuthorBot) { + if (isBotAuthor) { continue; } const duplicateCheckPrompt = proposalPolice_1.default.getPromptForNewProposalDuplicateCheck(previousProposal.body, newProposalBody); diff --git a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts index 54129d24aa56..58d20364a425 100644 --- a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts +++ b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts @@ -28,6 +28,33 @@ function isCommentEditedEvent(payload: IssueCommentEvent): payload is IssueComme return payload.action === CONST.ACTIONS.EDITED; } +/** + * Checks if a comment body matches the criteria for a Proposal. + */ +function getIsProposal(body: string | null | undefined): boolean { + if (!body) { + return false; + } + const lowerCaseBody = body.toLowerCase(); + return body.includes(CONST.PROPOSAL_KEYWORD) && lowerCaseBody.includes(CONST.PROPOSAL_HEADER_A) && lowerCaseBody.includes(CONST.PROPOSAL_HEADER_B); +} + +/** + * Determines if a comment author is a known bot or a bot-type account. + */ +function getIsBotAuthor(user: {login?: string; type?: string} | null | undefined): boolean { + if (!user) { + return false; + } + + const knownBotLogins: string[] = [CONST.COMMENT.NAME_MELVIN_A, CONST.COMMENT.NAME_MELVIN_B, CONST.COMMENT.NAME_CODEX, CONST.COMMENT.NAME_GITHUB_ACTIONS]; + + const isBotType = user.type === CONST.COMMENT.TYPE_BOT; + const isKnownLogin = knownBotLogins.includes(user.login ?? ''); + + return isBotType || isKnownLogin; +} + // Main function to process the workflow event async function run() { // Capture the timestamp immediately at the start of the run @@ -93,23 +120,24 @@ async function run() { let didFindDuplicate = false; let originalProposal: TupleToUnion | undefined; + + const isNewCommentAProposal = getIsProposal(newProposalBody); + if (!isNewCommentAProposal) { + console.log('New comment is not a proposal. Skipping duplicate check.'); + return; + } + for (const previousProposal of commentsResponse) { const body = previousProposal.body ?? ''; - const lowerCaseBody = body.toLowerCase() ?? ''; - const isProposal = !!body.includes(CONST.PROPOSAL_KEYWORD) && !!lowerCaseBody.includes(CONST.PROPOSAL_HEADER_A) && !!lowerCaseBody.includes(CONST.PROPOSAL_HEADER_B); + const isProposal = getIsProposal(body); const previousProposalCreatedAt = new Date(previousProposal.created_at).getTime(); // Early continue if not a proposal or previous comment is newer than current one if (!isProposal || previousProposalCreatedAt >= newProposalCreatedAt) { continue; } - const isAuthorBot = - previousProposal.user?.login === CONST.COMMENT.NAME_MELVIN_A || - previousProposal.user?.login === CONST.COMMENT.NAME_MELVIN_B || - previousProposal.user?.login === CONST.COMMENT.NAME_CODEX || - previousProposal.user?.login === CONST.COMMENT.NAME_GITHUB_ACTIONS || - previousProposal.user?.type === CONST.COMMENT.TYPE_BOT; + const isBotAuthor = getIsBotAuthor(previousProposal.user); // Skip prompting if comment author is the GH bot - if (isAuthorBot) { + if (isBotAuthor) { continue; } From 97b21ae69ebc6410e412c1f59d3d7ed236eb01c3 Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Thu, 19 Feb 2026 14:22:48 -0800 Subject: [PATCH 5/6] fix: melvin bot const naming --- .github/actions/javascript/authorChecklist/index.js | 4 ++-- .github/actions/javascript/awaitStagingDeploys/index.js | 4 ++-- .github/actions/javascript/checkAndroidStatus/index.js | 4 ++-- .github/actions/javascript/checkDeployBlockers/index.js | 4 ++-- .github/actions/javascript/checkSVGCompression/index.js | 4 ++-- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 4 ++-- .github/actions/javascript/formatCodeCovComment/index.js | 4 ++-- .github/actions/javascript/getArtifactInfo/index.js | 4 ++-- .../actions/javascript/getDeployPullRequestList/index.js | 4 ++-- .github/actions/javascript/getPreviousVersion/index.js | 4 ++-- .github/actions/javascript/getPullRequestDetails/index.js | 4 ++-- .../javascript/getPullRequestIncrementalChanges/index.js | 4 ++-- .github/actions/javascript/isStagingDeployLocked/index.js | 4 ++-- .../actions/javascript/markPullRequestsAsDeployed/index.js | 4 ++-- .github/actions/javascript/postTestBuildComment/index.js | 4 ++-- .github/actions/javascript/proposalPoliceComment/index.js | 6 +++--- .../proposalPoliceComment/proposalPoliceComment.ts | 2 +- .github/actions/javascript/reopenIssueWithComment/index.js | 4 ++-- .github/actions/javascript/reviewerChecklist/index.js | 4 ++-- .github/actions/javascript/verifySignedCommits/index.js | 4 ++-- .github/actions/javascript/waitForPreviousRuns/index.js | 4 ++-- .github/libs/CONST.ts | 4 ++-- 22 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index 44bc3a9810d9..ae09fe45b183 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -15589,8 +15589,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 96c8fc57de01..855f00918656 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12367,8 +12367,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 047b1f039e27..42508a3b45b9 100644 --- a/.github/actions/javascript/checkAndroidStatus/index.js +++ b/.github/actions/javascript/checkAndroidStatus/index.js @@ -737110,8 +737110,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 0ee5f818ff31..37e059a44dac 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -11634,8 +11634,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 6dc9b10fc4f2..3da4a6c7b725 100644 --- a/.github/actions/javascript/checkSVGCompression/index.js +++ b/.github/actions/javascript/checkSVGCompression/index.js @@ -20159,8 +20159,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 3c53198cf980..57344b7fc492 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -11853,8 +11853,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 51672fce8dff..0560105045ec 100644 --- a/.github/actions/javascript/formatCodeCovComment/index.js +++ b/.github/actions/javascript/formatCodeCovComment/index.js @@ -11821,8 +11821,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 a49240ba1573..82250594ffc2 100644 --- a/.github/actions/javascript/getArtifactInfo/index.js +++ b/.github/actions/javascript/getArtifactInfo/index.js @@ -11595,8 +11595,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 1fd4d529c97f..ccd609e0585b 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -11781,8 +11781,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 e020ae136e58..bb0c12856ab3 100644 --- a/.github/actions/javascript/getPreviousVersion/index.js +++ b/.github/actions/javascript/getPreviousVersion/index.js @@ -11592,8 +11592,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 548946e3affd..9d977251e8d3 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -11724,8 +11724,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 e64e5ef69964..474878cd1794 100644 --- a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js +++ b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js @@ -11826,8 +11826,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 d8d67bbf6d24..30da28147269 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -11595,8 +11595,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 415d0dcb5f5b..e97a67978d6b 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -13047,8 +13047,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 0c489fd0230e..b031218e2ca8 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -11724,8 +11724,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 ec32cd1abfca..e41e4447163b 100644 --- a/.github/actions/javascript/proposalPoliceComment/index.js +++ b/.github/actions/javascript/proposalPoliceComment/index.js @@ -11613,7 +11613,7 @@ function getIsBotAuthor(user) { if (!user) { return false; } - const knownBotLogins = [CONST_1.default.COMMENT.NAME_MELVIN_A, CONST_1.default.COMMENT.NAME_MELVIN_B, CONST_1.default.COMMENT.NAME_CODEX, CONST_1.default.COMMENT.NAME_GITHUB_ACTIONS]; + 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 isBotType = user.type === CONST_1.default.COMMENT.TYPE_BOT; const isKnownLogin = knownBotLogins.includes(user.login ?? ''); return isBotType || isKnownLogin; @@ -11894,8 +11894,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 58d20364a425..96dc79d61b6b 100644 --- a/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts +++ b/.github/actions/javascript/proposalPoliceComment/proposalPoliceComment.ts @@ -47,7 +47,7 @@ function getIsBotAuthor(user: {login?: string; type?: string} | null | undefined return false; } - const knownBotLogins: string[] = [CONST.COMMENT.NAME_MELVIN_A, CONST.COMMENT.NAME_MELVIN_B, CONST.COMMENT.NAME_CODEX, CONST.COMMENT.NAME_GITHUB_ACTIONS]; + const knownBotLogins: string[] = [CONST.COMMENT.NAME_MELVIN_BOT, CONST.COMMENT.NAME_MELVIN_USER, CONST.COMMENT.NAME_CODEX, CONST.COMMENT.NAME_GITHUB_ACTIONS]; const isBotType = user.type === CONST.COMMENT.TYPE_BOT; const isKnownLogin = knownBotLogins.includes(user.login ?? ''); diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index f4f44a9c529d..7079e4859fe1 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -11605,8 +11605,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 3863e9056b11..a738804efe79 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -11697,8 +11697,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 0d4bf92b5c68..8c268a37cfcc 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -11637,8 +11637,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 cef7d5b2f5c5..dd2c0a380d60 100644 --- a/.github/actions/javascript/waitForPreviousRuns/index.js +++ b/.github/actions/javascript/waitForPreviousRuns/index.js @@ -11646,8 +11646,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-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 2cd4a0679605..5fabfda0d155 100644 --- a/.github/libs/CONST.ts +++ b/.github/libs/CONST.ts @@ -24,8 +24,8 @@ const CONST = { }, COMMENT: { TYPE_BOT: 'Bot', - NAME_MELVIN_A: 'melvin-bot', - NAME_MELVIN_B: 'MelvinBot', + NAME_MELVIN_BOT: 'melvin-bot', + NAME_MELVIN_USER: 'MelvinBot', NAME_CODEX: 'chatgpt-codex-connector', NAME_GITHUB_ACTIONS: 'github-actions', }, From beaa20793d025aaef3475d5ff927a4cdf5c8758b Mon Sep 17 00:00:00 2001 From: Kevin Brian Bader Date: Thu, 19 Feb 2026 14:23:50 -0800 Subject: [PATCH 6/6] chore: submodule sync --- Mobile-Expensify | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 73d80f53c881..1fe80277618a 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 73d80f53c881d64d5a4575530c37ab9d0cc47723 +Subproject commit 1fe80277618ae2c768995d9972c363d658404a1f