Skip to content

🤖 Friday changelogs #918

Open
torresmateo wants to merge 3 commits intomainfrom
mateo/changelog-04-10
Open

🤖 Friday changelogs #918
torresmateo wants to merge 3 commits intomainfrom
mateo/changelog-04-10

Conversation

@torresmateo
Copy link
Copy Markdown
Collaborator

@torresmateo torresmateo commented Apr 10, 2026

  • generated changelogs since the last update
  • upgraded changelog agent to include only production commits

Note

Medium Risk
Changes changelog generation logic to filter PRs by what has reached the production branch via GitHub compare APIs, which could unintentionally omit or include entries if branch/merge SHA assumptions are wrong.

Overview
Updates the changelog generator to only include PRs that are actually deployed to production by adding per-repo productionBranch config, capturing merge_commit_sha, and filtering merged PRs using GitHub’s compare API (production...main).

Simplifies output generation by removing the LLM “combine related entries” step and emitting one line per categorized PR with a single (repo PR #N) source, and updates the docs changelog page with a new 2026-04-10 entry.

Reviewed by Cursor Bugbot for commit 2bee6cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@torresmateo torresmateo requested a review from EricGustin April 10, 2026 18:26
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 10, 2026 7:48pm

Request Review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Unused privateRepos variable left after refactoring
    • Removed the unused privateRepos declaration from formatEntry since it is no longer referenced.
  • ✅ Fixed: Compare API 250-commit limit causes incomplete filtering
    • Updated getUndeployedSHAs to paginate the compare API with per_page and page so all undeployed commit SHAs are collected.

Create PR

Or push these changes by commenting:

@cursor push 9af675d55f
Preview (9af675d55f)
diff --git a/agents/changelog/generate.ts b/agents/changelog/generate.ts
--- a/agents/changelog/generate.ts
+++ b/agents/changelog/generate.ts
@@ -206,33 +206,42 @@
   const token = process.env.GITHUB_TOKEN;
   if (!token) throw new Error("GITHUB_TOKEN env var is required");
 
-  const url = `https://api.github.com/repos/${owner}/${repo}/compare/${productionBranch}...main`;
-  const res = await fetch(url, {
-    headers: {
-      Accept: "application/vnd.github+json",
-      Authorization: `Bearer ${token}`,
-      "X-GitHub-Api-Version": "2022-11-28",
-    },
-  });
+  const shas = new Set<string>();
 
-  if (!res.ok) {
-    const body = await res.text();
-    throw new Error(`GitHub compare API error for ${owner}/${repo}: ${res.status} ${body}`);
+  const perPage = 100;
+  let page = 1;
+
+  while (true) {
+    const url = `https://api.github.com/repos/${owner}/${repo}/compare/${productionBranch}...main?per_page=${perPage}&page=${page}`;
+    const res = await fetch(url, {
+      headers: {
+        Accept: "application/vnd.github+json",
+        Authorization: `Bearer ${token}`,
+        "X-GitHub-Api-Version": "2022-11-28",
+      },
+    });
+
+    if (!res.ok) {
+      const body = await res.text();
+      throw new Error(`GitHub compare API error for ${owner}/${repo}: ${res.status} ${body}`);
+    }
+
+    const data: any = await res.json();
+    const commits = data.commits || [];
+    for (const commit of commits) {
+      shas.add(commit.sha);
+    }
+
+    if (commits.length < perPage) break;
+    page++;
   }
 
-  const data: any = await res.json();
-  const shas = new Set<string>();
-  for (const commit of data.commits) {
-    shas.add(commit.sha);
-  }
   return shas;
 }
 
 // --- Step 6: Format the entry ---
 
 function formatEntry(date: string, entries: CategorizedPR[]): string {
-  const privateRepos = new Set(REPOS.filter((r) => r.private).map((r) => r.repo));
-
   const sorted = [...entries].sort((a, b) => a.merged_at.localeCompare(b.merged_at));
 
   const grouped: Record<string, CategorizedPR[]> = {};

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8936d9d. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants