Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Unused
privateReposvariable left after refactoring- Removed the unused
privateReposdeclaration fromformatEntrysince it is no longer referenced.
- Removed the unused
- ✅ Fixed: Compare API 250-commit limit causes incomplete filtering
- Updated
getUndeployedSHAsto paginate the compare API withper_pageandpageso all undeployed commit SHAs are collected.
- Updated
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.
EricGustin
reviewed
Apr 10, 2026
EricGustin
reviewed
Apr 10, 2026
EricGustin
reviewed
Apr 10, 2026
EricGustin
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
Medium Risk
Changes changelog generation logic to filter PRs by what has reached the
productionbranch 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
productionBranchconfig, capturingmerge_commit_sha, and filtering merged PRs using GitHub’scompareAPI (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 new2026-04-10entry.Reviewed by Cursor Bugbot for commit 2bee6cb. Bugbot is set up for automated code reviews on this repo. Configure here.