Fish Trophy

david got a fish trophy!

Fish Trophy

Add support for getting diffs from GitLab APIv4.

Review Request #12221 — Created March 31, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
f00f1f6...

Reviewers

GitLab has been slowly decommissioning old API endpoints, especially on
the SaaS gitlab.org. They recently got rid of the old diff endpoint,
which we were still using because the v4 API doesn't have a great way to
get the diffs. Unfortunately, this means we need to actually implement
support for v4.

This works somewhat similarly to how the GitHub diff API works, where
instead of just getting a full copy of the diff, we get a JSON blob that
includes diff fragments for each file. This is somewhat complicated by
the fact that said diff fragments do not contain the blob SHAs for the
old and new revisions. We have to go get that information from the file
API, which is a bit chatty but at least we can just use a HEAD request
to get only the metadata instead of having to fetch the file content.

  • Added a bunch of GitLab repositories and created post-commit review
    requests for commits that included modified, added, and deleted files.
    Saw things work every time.
  • Ran unit tests.
    Loading...