site: block Copilot bot、renovate bot、dependa bot (#55150)

* site: block Copilot bot

* update

* update

* update

* update
This commit is contained in:
lijianan
2025-09-26 08:13:57 +08:00
committed by GitHub
parent bd1aa0114e
commit 1d433d59d5
4 changed files with 40 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ interface ContributorAvatarProps {
const ContributorAvatar: React.FC<ContributorAvatarProps> = (props) => {
const { item: { username, url } = {} } = props;
if (username?.includes('github-actions')) {
if (!username) {
return null;
}
return (

View File

@@ -37,6 +37,9 @@ interface ContributorsProps {
filename?: string;
}
// 这些机器人账号不需要展示
const blockList = ['github-actions', 'copilot', 'renovate', 'dependabot'];
const Contributors: React.FC<ContributorsProps> = ({ filename }) => {
const { formatMessage } = useIntl();
const { styles } = useStyle();
@@ -55,6 +58,7 @@ const Contributors: React.FC<ContributorsProps> = ({ filename }) => {
owner="ant-design"
fileName={filename}
className={styles.list}
filter={(item) => !blockList.some((name) => name === item?.username?.toLowerCase())}
renderItem={(item, loading) => (
<ContributorAvatar item={item} loading={loading} key={item?.url} />
)}
@@ -63,7 +67,7 @@ const Contributors: React.FC<ContributorsProps> = ({ filename }) => {
);
};
const SuspenseContributors: React.FC<React.ComponentProps<typeof Contributors>> = (props) => (
const SuspenseContributors: React.FC<ContributorsProps> = (props) => (
<Suspense fallback={null}>
<Contributors {...props} />
</Suspense>

View File

@@ -3,6 +3,7 @@
"07akioni",
"0xflotus",
"17073025",
"17hz",
"2724635499",
"282159468",
"778758944",
@@ -51,6 +52,7 @@
"Alexey Yakovlev",
"Alexis Hope",
"Alfred Qiu",
"Ali Mahallati",
"Ali Zhdanov",
"AliReza Kamkar",
"AliRezaBeigy",
@@ -219,6 +221,7 @@
"Dave",
"David Broder-Rodgers",
"David Hatten",
"David Hsing",
"David Schneider",
"Davide Bianchi",
"Dawnlck",
@@ -294,6 +297,7 @@
"Eward Song",
"FJHou",
"Fachreza Muslim",
"FatahChan",
"Fatpandac",
"Federico Marcos",
"Ferdi Koomen",
@@ -322,6 +326,7 @@
"Gao Jiangmiao",
"Garrick Crouch",
"Gautier",
"GeoDaoyu",
"Geoff Holden",
"Geoffrey Bell",
"George Ciobanu",
@@ -387,6 +392,7 @@
"Hughen",
"Hugo LEHMANN",
"Humble",
"Hwansoo Kim",
"Hyunseok.Kim",
"ILdar Nogmanov",
"Ideveloper (이승규)",
@@ -701,6 +707,7 @@
"Mr.Biscuit",
"Mr.Tone",
"Mr.jiangzhiguo",
"MrWangJustToDo",
"Ms. Wang",
"MuYu",
"Muhammad Abuzar",
@@ -822,7 +829,6 @@
"Reed Sun",
"Regan Langford",
"Renny Ren",
"Renovate Bot",
"Rex",
"Rex Zeng",
"Ricardo Morais",
@@ -945,6 +951,7 @@
"Taucher Christoph",
"Taylor Sabell",
"Ted Shin",
"Teimur Gasanov",
"Teng YANG",
"Tengjiao Cai",
"Terence",
@@ -1062,6 +1069,7 @@
"Yee",
"Yevhen Hryhorevskyi",
"Yiming",
"Yingtao Mo",
"Yogesh",
"Yu",
"Yu Mao",
@@ -1181,6 +1189,7 @@
"chenxiang",
"chenxiaochun",
"chequerNoel",
"chimobi-justice",
"chisus",
"chunlea",
"cieldon32",
@@ -1207,7 +1216,6 @@
"decade",
"delesseps",
"denzw",
"dependabot[bot]",
"desperado",
"detailyang",
"devqin",
@@ -1251,6 +1259,7 @@
"gin-lsl",
"godfather",
"gregahren",
"gregor-mueller",
"gxvv",
"gyh9457",
"gzq",
@@ -1290,6 +1299,7 @@
"ibrahim velinov",
"ice",
"imosapatryk",
"inottn",
"int2d",
"iojichervo",
"iola1999",
@@ -1352,6 +1362,7 @@
"lalalazero",
"lamvananh",
"leadream",
"legend80s",
"lehug",
"leijingdao",
"leixd1994",
@@ -1443,7 +1454,9 @@
"qi gao",
"qianbin",
"qiaojie",
"qinware",
"qiqiboy",
"qixian",
"qliu",
"qqabcv520",
"qramilq",
@@ -1549,6 +1562,7 @@
"wving5",
"wwwxy",
"wx1322",
"x1ngYu",
"xiaofan2406",
"xiaofine1122",
"xiaohuoni",
@@ -1635,11 +1649,13 @@
"°))))彡",
"Ömer Faruk APLAK",
"Đào Văn Hùng",
"Łukasz Komoszyński",
"Ștefan Filip",
"Зухриддин Камильжанов",
"रोहन मल्होत्रा",
"ᴡᴏɴᴋʏᴜɴɢ ᴍɪɴ",
"一喵呜",
"一步",
"丁文涛",
"不吃猫的鱼",
"丶尘殇",
@@ -1695,7 +1711,6 @@
"徐新航",
"愚道",
"曾凯",
"期贤",
"未觉雨声",
"朮厃",
"李勇",
@@ -1751,6 +1766,7 @@
"诸葛龙",
"谭真",
"超能刚哥",
"达峰的夏天",
"迷渡",
"遇见同学",
"那里好脏不可以",
@@ -1778,6 +1794,7 @@
"黑雨",
"龙风",
"龚方闻",
"강주혁(Juhyeok Kang)",
"𝑾𝒖𝒙𝒉",
"🏎️ Yumo"
]

View File

@@ -5,6 +5,7 @@ import unionBy from 'lodash/unionBy';
import simpleGit from 'simple-git';
const cwd = process.cwd();
const git = simpleGit(cwd);
const excludes = [
@@ -15,29 +16,28 @@ const excludes = [
'alipay.com',
'taobao.com',
'ant-design-bot',
'github-actions',
'copilot',
'renovate',
'renovate[bot]',
'dependabot',
'dependabot[bot]',
];
async function execute() {
const logResult = await git.log();
let all = logResult.all.filter(({ author_email: email }) => {
for (let i = 0; i < excludes.length; i++) {
const item = excludes[i];
if (email.includes(item)) {
return false;
}
}
return true;
const filtered = logResult.all.filter(({ author_name, author_email }) => {
const name = author_name.toLowerCase();
const email = author_email.toLowerCase();
return !excludes.some((item) => email.includes(item) || name.includes(item));
});
all = sortBy(unionBy(all, 'author_email'), 'author_name');
const all = sortBy(unionBy(filtered, 'author_email'), 'author_name');
fs.writeFileSync(
path.join(cwd, 'contributors.json'),
JSON.stringify(
Array.from(new Set<string>(all.map((authorItem) => authorItem.author_name))),
null,
2,
),
JSON.stringify(Array.from(new Set(all.map((authorItem) => authorItem.author_name))), null, 2),
);
}