Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/checkSVGCompression/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/formatCodeCovComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/getArtifactInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/postTestBuildComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 7 additions & 3 deletions .github/actions/javascript/proposalPoliceComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/reviewerChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/verifySignedCommits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/waitForPreviousRuns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion .github/libs/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading