summaryrefslogtreecommitdiffhomepage
path: root/script
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-02-01 20:17:15 -0500
committerDax Raad <[email protected]>2026-02-01 20:17:15 -0500
commitf390ac251dc2d7d64a5b1a97b9133fcf65c0a2b1 (patch)
tree2a5f6fdacd2d7fc6897de070b6110b5faaf455cc /script
parent7837bbc639c79d74ade3e6c397da3cb34a58b198 (diff)
downloadopencode-f390ac251dc2d7d64a5b1a97b9133fcf65c0a2b1.tar.gz
opencode-f390ac251dc2d7d64a5b1a97b9133fcf65c0a2b1.zip
ci: centralize team list in @opencode-ai/script package and use beta label filter
Diffstat (limited to 'script')
-rwxr-xr-xscript/beta.ts25
-rwxr-xr-xscript/changelog.ts19
2 files changed, 7 insertions, 37 deletions
diff --git a/script/beta.ts b/script/beta.ts
index 50dc2ad78..53329e4dc 100755
--- a/script/beta.ts
+++ b/script/beta.ts
@@ -1,7 +1,6 @@
#!/usr/bin/env bun
import { $ } from "bun"
-import { Script } from "@opencode-ai/script"
interface PR {
number: number
@@ -32,28 +31,12 @@ Please resolve this issue to include this PR in the next beta release.`
}
async function main() {
- console.log("Fetching open PRs with beta label from team members...")
+ console.log("Fetching open PRs with beta label...")
- const allPrs: PR[] = []
- for (const member of Script.team) {
- try {
- const stdout =
- await $`gh pr list --state open --author ${member} --label beta --json number,title,author,labels --limit 100`.text()
- const memberPrs: PR[] = JSON.parse(stdout)
- allPrs.push(...memberPrs)
- } catch {
- // Skip member on error
- }
- }
-
- const seen = new Set<number>()
- const prs = allPrs.filter((pr) => {
- if (seen.has(pr.number)) return false
- seen.add(pr.number)
- return true
- })
+ const stdout = await $`gh pr list --state open --label beta --json number,title,author,labels --limit 100`.text()
+ const prs: PR[] = JSON.parse(stdout)
- console.log(`Found ${prs.length} open PRs with beta label from team members`)
+ console.log(`Found ${prs.length} open PRs with beta label`)
if (prs.length === 0) {
console.log("No team PRs to merge")
diff --git a/script/changelog.ts b/script/changelog.ts
index 0043cd3d6..5fc30a228 100755
--- a/script/changelog.ts
+++ b/script/changelog.ts
@@ -3,20 +3,7 @@
import { $ } from "bun"
import { createOpencode } from "@opencode-ai/sdk/v2"
import { parseArgs } from "util"
-
-export const team = [
- "actions-user",
- "opencode",
- "rekram1-node",
- "thdxr",
- "kommander",
- "jayair",
- "fwang",
- "adamdotdevin",
- "iamdavidhill",
- "opencode-agent[bot]",
- "R44VC0RP",
-]
+import { Script } from "@opencode-ai/script"
type Release = {
tag_name: string
@@ -191,7 +178,7 @@ export async function generateChangelog(commits: Commit[], opencode: Awaited<Ret
for (let i = 0; i < commits.length; i++) {
const commit = commits[i]!
const section = getSection(commit.areas)
- const attribution = commit.author && !team.includes(commit.author) ? ` (@${commit.author})` : ""
+ const attribution = commit.author && !Script.team.includes(commit.author) ? ` (@${commit.author})` : ""
const entry = `- ${summaries[i]}${attribution}`
if (!grouped.has(section)) grouped.set(section, [])
@@ -222,7 +209,7 @@ export async function getContributors(from: string, to: string) {
const title = message.split("\n")[0] ?? ""
if (title.match(/^(ignore:|test:|chore:|ci:|release:)/i)) continue
- if (login && !team.includes(login)) {
+ if (login && !Script.team.includes(login)) {
if (!contributors.has(login)) contributors.set(login, new Set())
contributors.get(login)!.add(title)
}