MCPcopy Create free account
hub / github.com/alibaba/open-code-review / isBotComment

Function isBotComment

scripts/github-actions/post-review-comments.js:1380–1386  ·  view source on GitHub ↗
(comment, botLogin)

Source from the content-addressed store, hash-verified

1378}
1379
1380function isBotComment(comment, botLogin) {
1381 if (!comment || !comment.user) return false;
1382 if (botLogin && comment.user.login === botLogin) return true;
1383 // GITHUB_TOKEN posts as "github-actions[bot]"; GitHub Apps post as the app.
1384 const login = comment.user.login || "";
1385 return /github-actions\[bot\]$/i.test(login) || (botLogin != null && login === botLogin);
1386}
1387
1388// Incremental overlap test. The current comment is considered a duplicate of
1389// an existing bot comment (and thus skipped) when they target the same path

Callers 1

runPostReviewCommentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected