Skip to content

fix(pull-requests): load GitLab MR diff and line counts through glab api - #1714

Merged
i098 merged 1 commit into
mainfrom
fm/cgx-n201-1712-gitlab-code
Dec 5, 2026
Merged

i098 merged 1 commit into
mainfrom
fm/cgx-n201-1712-gitlab-code

Conversation

@i098

@i098 i098 commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Refs #1712

Summary

On an MR !N tab, the Code subtab now loads the diff through glab api, and the Summary shows the real additions and deletions.

What changed and why

  • gh-pr-patch for a GitLab identity calls glab api projects/<p>/merge_requests/<n>/changes and builds a unified diff (merge_request_diff). Before, it ran gh api graphql and failed.
  • merge_request_detail maps additions and deletions from the same changes response. Before, the Branch row showed +0 -0.

Test evidence

  • cargo test -p app --lib merge_request on Linux: 4 passed, including merge_request_maps_to_the_summary_fields, which now checks counts and the diff text.
  • Live GitLab smoke pending: no GitLab host on this host.

Checklist

  • One concern in this pull request.
  • Title and commit follow Conventional Commits.
  • cargo fmt is clean.
  • clippy and full workspace test not run: only the touched test ran.
  • Not a visual change.
  • No CHANGELOG line: this closes a gap in an unreleased GitLab tab.

@i098
i098 merged commit f689092 into main Dec 5, 2026
4 checks passed
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.

1 participant