✨ feat(vscode): 摘修复未关联提交置顶

This commit is contained in:
cruldra committed 2026-09-01 19:09:02 +08:00
1 parent 5284fc1730
commit 54fc2ead4c
3 files changed
+6 -20

No files matched your search

+4 -18
View File
@@ -72,24 +72,10 @@ describe('纯函数', () => {
{ sha: '5572c4f', subject: 'fix(membership): 年付月度发卡', author: 'chehongweo', date: '2026-08-31', body: '', pr: 260, prTitle: '连续包月会员订阅体系' },
{ sha: 'c', subject: 'chore: lone', author: 'you', date: '2026-08-30', body: '' },
])
expect(groups).toEqual([
{
pr: 260,
title: '连续包月会员订阅体系',
authors: ['chehongweo'],
commits: [
{ sha: '3e519ea', subject: 'fix(admin): 会员档位隐藏', author: 'chehongweo', date: '2026-08-31', body: '', pr: 260, prTitle: '连续包月会员订阅体系' },
{ sha: '5572c4f', subject: 'fix(membership): 年付月度发卡', author: 'chehongweo', date: '2026-08-31', body: '', pr: 260, prTitle: '连续包月会员订阅体系' },
],
},
{
title: '未关联 PR',
authors: ['you'],
commits: [
{ sha: 'c', subject: 'chore: lone', author: 'you', date: '2026-08-30', body: '' },
],
},
])
expect(groups.map(g => g.title)).toEqual(['未关联 PR', '连续包月会员订阅体系'])
expect(groups[0].commits.map(c => c.sha)).toEqual(['c'])
expect(groups[1].pr).toBe(260)
expect(groups[1].commits.map(c => c.sha)).toEqual(['3e519ea', '5572c4f'])
})
})