GeezerVison is showing github.com — chore: group beta PR logs (#24236) · BlueBlock/opencode@cdc7d5f
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/beta.ts +15-2Lines changed: 15 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -57,6 +57,19 @@ function lines(prs: PR[]) { |
57 | 57 | return prs.map((x) => `- #${x.number}: ${x.title}`).join("\n") || "(none)" |
58 | 58 | } |
59 | 59 |
|
| 60 | +function group(title: string) { |
| 61 | + if (process.env.GITHUB_ACTIONS !== "true") { |
| 62 | + console.log(title) |
| 63 | + return { [Symbol.dispose]() {} } |
| 64 | + } |
| 65 | + console.log(`::group::${title}`) |
| 66 | + return { |
| 67 | + [Symbol.dispose]() { |
| 68 | + console.log("::endgroup::") |
| 69 | + }, |
| 70 | + } |
| 71 | +} |
| 72 | + |
60 | 73 | async function typecheck() { |
61 | 74 | console.log(" Running typecheck...") |
62 | 75 |
|
@@ -227,8 +240,8 @@ async function main() { |
227 | 240 | const failed: FailedPR[] = [] |
228 | 241 |
|
229 | 242 | for (const [idx, pr] of prs.entries()) { |
230 | | - console.log(`\nProcessing PR ${idx + 1}/${prs.length} #${pr.number}: ${pr.title}`) |
231 | | - |
| 243 | + console.log() |
| 244 | + using _ = group(`Processing PR ${idx + 1}/${prs.length} #${pr.number}: ${pr.title}`) |
232 | 245 | console.log(" Fetching PR head...") |
233 | 246 | try { |
234 | 247 | await $`git fetch origin pull/${pr.number}/head:pr/${pr.number}` |
|