GeezerVison is showing github.com — ci: dedup stuff in changelog (#8522) · nickihm/opencode@87438fb
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: script/changelog.ts +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -196,16 +196,16 @@ export async function getContributors(from: string, to: string) { |
196 | 196 | const toRef = to === "HEAD" ? to : to.startsWith("v") ? to : `v${to}` |
197 | 197 | const compare = |
198 | 198 | await $`gh api "/repos/anomalyco/opencode/compare/${fromRef}...${toRef}" --jq '.commits[] | {login: .author.login, message: .commit.message}'`.text() |
199 | | - const contributors = new Map<string, string[]>() |
| 199 | + const contributors = new Map<string, Set<string>>() |
200 | 200 |
|
201 | 201 | for (const line of compare.split("\n").filter(Boolean)) { |
202 | 202 | const { login, message } = JSON.parse(line) as { login: string | null; message: string } |
203 | 203 | const title = message.split("\n")[0] ?? "" |
204 | 204 | if (title.match(/^(ignore:|test:|chore:|ci:|release:)/i)) continue |
205 | 205 |
|
206 | 206 | if (login && !team.includes(login)) { |
207 | | - if (!contributors.has(login)) contributors.set(login, []) |
208 | | - contributors.get(login)?.push(title) |
| 207 | + if (!contributors.has(login)) contributors.set(login, new Set()) |
| 208 | + contributors.get(login)!.add(title) |
209 | 209 | } |
210 | 210 | } |
211 | 211 |
|
|