From 1d433d59d59b888a9273d7ecf2042b6884ed0bfb Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 26 Sep 2025 08:13:57 +0800 Subject: [PATCH] =?UTF-8?q?site:=20block=20Copilot=20bot=E3=80=81renovate?= =?UTF-8?q?=20bot=E3=80=81dependa=20bot=20(#55150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * site: block Copilot bot * update * update * update * update --- .../theme/slots/Content/ContributorAvatar.tsx | 2 +- .dumi/theme/slots/Content/Contributors.tsx | 6 +++- contributors.json | 23 +++++++++++++-- scripts/generate-authors.ts | 28 +++++++++---------- 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/.dumi/theme/slots/Content/ContributorAvatar.tsx b/.dumi/theme/slots/Content/ContributorAvatar.tsx index a0b66c1843..f7dcb88e1c 100644 --- a/.dumi/theme/slots/Content/ContributorAvatar.tsx +++ b/.dumi/theme/slots/Content/ContributorAvatar.tsx @@ -9,7 +9,7 @@ interface ContributorAvatarProps { const ContributorAvatar: React.FC = (props) => { const { item: { username, url } = {} } = props; - if (username?.includes('github-actions')) { + if (!username) { return null; } return ( diff --git a/.dumi/theme/slots/Content/Contributors.tsx b/.dumi/theme/slots/Content/Contributors.tsx index 0de2cebbdb..669f6bbf7d 100644 --- a/.dumi/theme/slots/Content/Contributors.tsx +++ b/.dumi/theme/slots/Content/Contributors.tsx @@ -37,6 +37,9 @@ interface ContributorsProps { filename?: string; } +// 这些机器人账号不需要展示 +const blockList = ['github-actions', 'copilot', 'renovate', 'dependabot']; + const Contributors: React.FC = ({ filename }) => { const { formatMessage } = useIntl(); const { styles } = useStyle(); @@ -55,6 +58,7 @@ const Contributors: React.FC = ({ filename }) => { owner="ant-design" fileName={filename} className={styles.list} + filter={(item) => !blockList.some((name) => name === item?.username?.toLowerCase())} renderItem={(item, loading) => ( )} @@ -63,7 +67,7 @@ const Contributors: React.FC = ({ filename }) => { ); }; -const SuspenseContributors: React.FC> = (props) => ( +const SuspenseContributors: React.FC = (props) => ( diff --git a/contributors.json b/contributors.json index 9dd86865a0..751f4084cb 100644 --- a/contributors.json +++ b/contributors.json @@ -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" ] diff --git a/scripts/generate-authors.ts b/scripts/generate-authors.ts index 0cfda9f552..89d6c39963 100644 --- a/scripts/generate-authors.ts +++ b/scripts/generate-authors.ts @@ -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(all.map((authorItem) => authorItem.author_name))), - null, - 2, - ), + JSON.stringify(Array.from(new Set(all.map((authorItem) => authorItem.author_name))), null, 2), ); }