✨ 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

+1 -1
View File
@@ -2,7 +2,7 @@
"publisher": "clurdra", "publisher": "clurdra",
"name": "superpowers-vscode-clurdra", "name": "superpowers-vscode-clurdra",
"displayName": "Superpowers-clurdra", "displayName": "Superpowers-clurdra",
"version": "0.2.110", "version": "0.2.111",
"packageManager": "pnpm@10.27.0", "packageManager": "pnpm@10.27.0",
"description": "Superpowers specs and plans Kanban explorer", "description": "Superpowers specs and plans Kanban explorer",
"author": "clurdra", "author": "clurdra",
+1 -1
View File
@@ -118,7 +118,7 @@ export function groupCommitsByPr(commits: UnreleasedCommit[]): ReleaseCommitGrou
if (!authors.includes(c.author)) if (!authors.includes(c.author))
authors.push(c.author) authors.push(c.author)
} }
out.push({ title: '未关联 PR', authors, commits: ungrouped }) out.unshift({ title: '未关联 PR', authors, commits: ungrouped })
} }
return out return out
} }
+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: '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: '' }, { sha: 'c', subject: 'chore: lone', author: 'you', date: '2026-08-30', body: '' },
]) ])
expect(groups).toEqual([ expect(groups.map(g => g.title)).toEqual(['未关联 PR', '连续包月会员订阅体系'])
{ expect(groups[0].commits.map(c => c.sha)).toEqual(['c'])
pr: 260, expect(groups[1].pr).toBe(260)
title: '连续包月会员订阅体系', expect(groups[1].commits.map(c => c.sha)).toEqual(['3e519ea', '5572c4f'])
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: '' },
],
},
])
}) })
}) })