| 1 | /** |
| 2 | * Logos, buttons, and status icons that review bots, agents, and CI stamp into pull requests. |
| 3 | * Each entry is a host plus a path that only serves those assets, so screenshots uploaded to |
| 4 | * the same service (such as cursor.com/artifacts or app.devin.ai/attachments) stay visible. |
| 5 | * Only the description's Attachments strip skips them; markdown still renders them inline. |
| 6 | */ |
| 7 | const BOT_BADGE_PREFIXES = [ |
| 8 | // Coding agents and review bots |
| 9 | "static.devin.ai/assets/", |
| 10 | "cursor.com/assets/images/", |
| 11 | "storage.googleapis.com/coderabbit_public_assets/", |
| 12 | "greptile-static-assets.s3.amazonaws.com/badges/", |
| 13 | "static.graphite.dev/", |
| 14 | "qodo.ai/wp-content/uploads/", |
| 15 | "cubic.dev/buttons/", |
| 16 | "github.githubassets.com/static/images/icons/copilot-code-review/", |
| 17 | "gstatic.com/codereviewagent/", |
| 18 | "vercel.com/vercel-agent-view-suggestion-", |
| 19 | "agents-vade-review.vercel.sh/", |
| 20 | "new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/", |
| 21 | "pr-comments-assets.blacksmith.sh/", |
| 22 | "app.roocode.com/cloud-agents/github/", |
| 23 | "app.parameter.ai/_static/icons/", |
| 24 | // CI, deploy, and dependency bots |
| 25 | "img.shields.io/", |
| 26 | "raster.shields.io/", |
| 27 | "dependabot-badges.githubapp.com/", |
| 28 | "developer.mend.io/api/mc/badges/", |
| 29 | "api.securityscorecards.dev/projects/", |
| 30 | "github-app-statics.socket.dev/", |
| 31 | "static.deepsource.com/comment_artifacts/", |
| 32 | "sonarsource.github.io/sonarcloud-github-static-resources/", |
| 33 | "codescene.io/imgs/svg/", |
| 34 | "app.codecov.io/gh/", |
| 35 | "github.com/codecov/engineering-team/assets/", |
| 36 | "codspeed.io/pr-report/", |
| 37 | "static.trunk.io/assets/", |
| 38 | "res.cloudinary.com/snyk/", |
| 39 | "api.segment.io/v1/pixel/", |
| 40 | "cla-assistant.io/pull/badge/", |
| 41 | "vercel.com/static/status/", |
| 42 | "vercel.com/api/www/avatar", |
| 43 | "app.netlify.com/qr-code/", |
| 44 | "workers.cloudflare.com/logo.svg", |
| 45 | // Cloudflare Pages reuses one old GitHub upload as its logo. |
| 46 | "user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png", |
| 47 | "qr.expo.dev/", |
| 48 | ]; |
| 49 | |
| 50 | export function isBotBadgeImage(href: string) { |
| 51 | const path = href.replace(/^https?:\/\/(?:www\.)?/i, "").toLowerCase(); |
| 52 | return BOT_BADGE_PREFIXES.some((prefix) => path.startsWith(prefix)); |
| 53 | } |