(comment, botLogin)
| 642 | } |
| 643 | |
| 644 | function isBotComment(comment, botLogin) { |
| 645 | if (!comment || !comment.user) return false; |
| 646 | if (botLogin && comment.user.login === botLogin) return true; |
| 647 | // GITHUB_TOKEN posts as "github-actions[bot]"; GitHub Apps post as the app. |
| 648 | const login = comment.user.login || ""; |
| 649 | return /github-actions\[bot\]$/i.test(login) || (botLogin != null && login === botLogin); |
| 650 | } |
| 651 | |
| 652 | // Incremental overlap test. The current comment is considered a duplicate of |
| 653 | // an existing bot comment (and thus skipped) when they target the same path |
no outgoing calls
no test coverage detected