Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

botBadgeImages.ts

50 lines1.9 KB

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