MCPcopy Create free account
hub / github.com/anomalyco/opencode / diff

Function diff

script/raw-changelog.ts:60–74  ·  view source on GitHub ↗
(base: string, head: string)

Source from the content-addressed store, hash-verified

58}
59
60async function diff(base: string, head: string) {
61 const list: Diff[] = []
62 for (let page = 1; ; page++) {
63 const text =
64 await $`gh api "/repos/${repo}/compare/${base}...${head}?per_page=100&page=${page}" --jq '.commits[] | {sha: .sha, login: .author.login, message: .commit.message}'`.text()
65 const batch = text
66 .split("\n")
67 .filter(Boolean)
68 .map((line) => JSON.parse(line) as Diff)
69 if (batch.length === 0) break
70 list.push(...batch)
71 if (batch.length < 100) break
72 }
73 return list
74}
75
76function section(areas: Set<string>) {
77 const priority = ["core", "tui", "app", "tauri", "sdk", "plugin", "extensions/vscode", "github"]

Callers 2

commitsFunction · 0.70
contributorsFunction · 0.70

Calls 2

pushMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected