Dashboard › cli › Distillation
a4aeefb3-b766-4de9-adfe-090ee6878442["lore_tm_v1_xzu9gusBf366yHaiI0wpsctReh62-z98vj2rer02g_4","lore_tm_v1_BBgwN2U2kkwrViBFXA09-Z7hnDI0X82oT_NdEL4lf94","lore_tm_v1_Q3eoCgKbjStyCLQfg3lJokQ9H2VSu58HzMuLz8j3-hU","lore_tm_v1_43w3SOpDgF8YfyDzAlHizi9ppUwmRxKWtfhZ8WCWrGs","lore_tm_v1_c4Hby0h-5PsAKCxpAZBuPxcXadhei3Tjs9NHhRdtBk4","lore_tm_v1_F5WpWYV5Fx2JJK23tNytjiB-HQC90jKI68QuEBSeyOQ"]
/home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/lib/release-notes.ts mutates the sections array in place, replacing markdown with truncated markdown.parseCommitMessages() in /home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/lib/release-notes.ts skips commits containing #skip-changelog, empty first lines, non-conventional commits, and unsupported prefixes; it maps accepted prefixes through COMMIT_PREFIX_TO_CATEGORY, groups descriptions by category, emits categories in CATEGORY_ORDER, and formats each description as a Markdown list item.CHANGELOG_MAX_RELEASES = 30 in /home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/src/lib/release-notes.ts; this exceeds the delta-upgrade cap of 12, stays below GitHub’s maximum per_page of 100, and is intended to cover approximately 6+ months of weekly releases.fetchReleasesForChangelog(source) requests ${getGitHubReleasesUrl(source)}?per_page=${CHANGELOG_MAX_RELEASES} with getGitHubHeaders(), returns [] on fetch failure, non-OK response, invalid JSON, or a non-array response, filters releases using release.tag_name.startsWith(source.tagPrefix), and normalizes retained tags by removing source.tagPrefix.fetchStableChangelog() accepts optional normalized prefetchedReleases to avoid a duplicate GitHub API request; otherwise it calls fetchReleasesForChangelog(source), returns null when no releases are available, and builds the result with buildChangelogSummaryForSource(releases, fromVersion, toVersion, { maxItems, source }).buildNightlyChangelogSummary(commits, fromVersion, toVersion, maxItems?) parses commit messages with parseCommitMessages() and passes the resulting sections to buildSummaryFromSections().fetchNightlyChangelog() extracts Unix timestamps from versions formatted like X.Y.Z-dev.<unix-seconds>, returns null if either timestamp is invalid, and queries https://api.github.com/repos/${source.githubRepo}/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.since = fromTs + 1 because GitHub’s since is inclusive and the current commit must be excluded, and until = toTs + 1 because GitHub’s until is exclusive and the target commit must be included.fetchNightlyChangelog() is best-effort: it returns null on request failure, non-OK response, invalid JSON, a non-array response, or an empty commit array; successful data is passed to buildNightlyChangelogSummary().FetchChangelogOptions defines channel: "stable" | "nightly", fromVersion, toVersion, optional maxItems, optional stable-only prefetchedReleases?: GitHubRelease[], and optional source?: UpgradeSource.fetchChangelog(opts) defaults source to PRIMARY_UPGRADE_SOURCE, dispatches nightly requests to fetchNightlyChangelog(fromVersion, toVersion, source, maxItems), dispatches stable requests to fetchStableChangelog() with prefetchedReleases, and catches all failures to log Changelog fetch failed: and return null; it is designed to run parallel to binary download with zero added latency./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/packages/cli/test/lib/release-notes.test.ts verify countListItems() returns 3 for - item 1\n- item 2\n- item 3, 0 for Just a paragraph., and 0 for an empty token array.UPGRADE_SOURCES[0], requests exactly https://api.github.com/repos/getsentry/toolkit/releases?per_page=30, accepts the cli@0.21.0 release containing Keep release stages source-affine, excludes mcp@99.0.0 and unprefixed 0.21.0, produces exactly 1 changelog item, and verifies no URL contains getsentry/cli.fetchRecentReleases(undefined, toolkitSource), supplies them as prefetchedReleases to fetchChangelog(), and verifies a 1-item changelog containing Reuse prefetched releases.UPGRADE_SOURCES[1], requests exactly https://api.github.com/repos/getsentry/cli/releases?per_page=30, and produces exactly 1 changelog item for Keep the legacy bridge working.0.21.0-dev.100 to 0.21.0-dev.200, parses the commit fix: keep nightly stages affine, produces exactly 1 changelog item, requests exactly https://api.github.com/repos/getsentry/toolkit/commits?sha=main&since=1970-01-01T00:01:41.000Z&until=1970-01-01T00:03:21.000Z&per_page=100, and verifies no URL contains getsentry/cli.