(comment, botLogin)
| 970 | } |
| 971 | |
| 972 | function isBotComment(comment, botLogin) { |
| 973 | if (!comment || !comment.user) return false; |
| 974 | if (botLogin && comment.user.login === botLogin) return true; |
| 975 | // GITHUB_TOKEN posts as "github-actions[bot]"; GitHub Apps post as the app. |
| 976 | const login = comment.user.login || ""; |
| 977 | return /github-actions\[bot\]$/i.test(login) || (botLogin != null && login === botLogin); |
| 978 | } |
| 979 | |
| 980 | // Incremental overlap test. The current comment is considered a duplicate of |
| 981 | // an existing bot comment (and thus skipped) when they target the same path |
no outgoing calls
no test coverage detected