✨ feat(vscode): 摘修复未关联提交置顶
This commit is contained in:
1 parent
5284fc1730
commit
54fc2ead4c
3 files changed
+6
-20
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
"publisher": "clurdra",
|
||||
"name": "superpowers-vscode-clurdra",
|
||||
"displayName": "Superpowers-clurdra",
|
||||
"version": "0.2.110",
|
||||
"version": "0.2.111",
|
||||
"packageManager": "pnpm@10.27.0",
|
||||
"description": "Superpowers specs and plans Kanban explorer",
|
||||
"author": "clurdra",
|
||||
|
||||
@@ -118,7 +118,7 @@ export function groupCommitsByPr(commits: UnreleasedCommit[]): ReleaseCommitGrou
|
||||
if (!authors.includes(c.author))
|
||||
authors.push(c.author)
|
||||
}
|
||||
out.push({ title: '未关联 PR', authors, commits: ungrouped })
|
||||
out.unshift({ title: '未关联 PR', authors, commits: ungrouped })
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -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'])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user