Fix fetching more than 100 branches on GitLab.

Review Request #11016 — Created May 7, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x

Reviewers

The GitLab API v4 support wasn't factoring in pagination for the
branches API (or the groups API, but that's currently only used on v3).
This means that if more than 100 branches are defined, only those first
100 will be shown in the New Review Request page.

This switches our implementation to use the standard pagination support.

It also cleans up the cod around checking the Link header to meet our
coding standards. Note that capitalization has changed for the Link
key in this code, but in practice the underlying code normalizes key
lookups, so this doesn't change any logic. It just makes it easier to
test against.

Unit tests have been added to check that paginated branches work
correctly.

Unit tests pass.

Commits

Files

    Loading...