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