Skip to content

Update compare_commits to return "ahead_by" value#28

Open
cmanallen wants to merge 3 commits into
mainfrom
cmanallen/commit-comparison
Open

Update compare_commits to return "ahead_by" value#28
cmanallen wants to merge 3 commits into
mainfrom
cmanallen/commit-comparison

Conversation

@cmanallen
Copy link
Copy Markdown
Member

No description provided.

@cmanallen cmanallen requested a review from a team as a code owner April 28, 2026 16:51
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 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7168e6c. Configure here.

type="gitlab",
raw={"data": raw, "headers": None},
meta=PaginatedResponseMeta(next_cursor=None),
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

GitLab ahead_by derived from truncated commits list

Low Severity

In GitLab.compare_commits, ahead_by is calculated from the length of the commits list returned by the GitLab API. Since the API can truncate this list, ahead_by may undercount the actual commits ahead. This diverges from the GitHub provider, which reports the true total.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7168e6c. Configure here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be better to make this unsupported/None for GL since it's calculated (and not correct)

type="gitlab",
raw={"data": raw, "headers": None},
meta=PaginatedResponseMeta(next_cursor=None),
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be better to make this unsupported/None for GL since it's calculated (and not correct)

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