mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
ci: dedup stuff in changelog (#8522)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6b6d6e9e07
commit
87438fb38e
@@ -196,7 +196,7 @@ export async function getContributors(from: string, to: string) {
|
|||||||
const toRef = to === "HEAD" ? to : to.startsWith("v") ? to : `v${to}`
|
const toRef = to === "HEAD" ? to : to.startsWith("v") ? to : `v${to}`
|
||||||
const compare =
|
const compare =
|
||||||
await $`gh api "/repos/anomalyco/opencode/compare/${fromRef}...${toRef}" --jq '.commits[] | {login: .author.login, message: .commit.message}'`.text()
|
await $`gh api "/repos/anomalyco/opencode/compare/${fromRef}...${toRef}" --jq '.commits[] | {login: .author.login, message: .commit.message}'`.text()
|
||||||
const contributors = new Map<string, string[]>()
|
const contributors = new Map<string, Set<string>>()
|
||||||
|
|
||||||
for (const line of compare.split("\n").filter(Boolean)) {
|
for (const line of compare.split("\n").filter(Boolean)) {
|
||||||
const { login, message } = JSON.parse(line) as { login: string | null; message: string }
|
const { login, message } = JSON.parse(line) as { login: string | null; message: string }
|
||||||
@@ -204,8 +204,8 @@ export async function getContributors(from: string, to: string) {
|
|||||||
if (title.match(/^(ignore:|test:|chore:|ci:|release:)/i)) continue
|
if (title.match(/^(ignore:|test:|chore:|ci:|release:)/i)) continue
|
||||||
|
|
||||||
if (login && !team.includes(login)) {
|
if (login && !team.includes(login)) {
|
||||||
if (!contributors.has(login)) contributors.set(login, [])
|
if (!contributors.has(login)) contributors.set(login, new Set())
|
||||||
contributors.get(login)?.push(title)
|
contributors.get(login)!.add(title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user