Provide a useful error when failing to perform post-commit with GitLab.

Review Request #11053 — Created June 23, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x

Reviewers

GitLab doesn't have a suitable API for accessing diff contents, so our
only option is to access a non-API URL for fetching diff contents. While
this used to work with private repositories via a Personal Access Token,
it hasn't worked for about a year now, as they've removed that
functionality from all public URLs to address a security issue.

This does still work on older versions or for public repositories,
though, so we want to keep the capability around. To do this, we're now
explicitly checking for a HTTP 404, and if we find it, we provide a
useful blurb of text explaining the situation and linking to a KB
article for more details.

As part of this, review request creation and updating now handles
HostingServiceError responses gracefully.

Unit tests pass.

Manually tested this error condition and saw a useful error message.

Manually tested against a public repository and saw the commit go
through.

Commits

Files

    Loading...