Skip to content

internal/extsvc/github: Reuse V3Client.GetVersion in V4Client

Administrator requested to merge ig/github-client-separation into main

Created by: indradhanush

Fixes #28276 (closed).

In this commit, we stop making a unique API request to /meta to identify the GitHub Enterprise Server's version. It turns out that we already have existing code to do this in the V3Client. As a result, it's nicer to reuse the code with the trade-off of initialising the V3Client within the V4Client when required.

This will not have any affect in the existing API quota usages of the GraphQL client since the /meta endpoint is part of the REST API itself and we continue to use the REST API with this change.

Since docs.github.com is down at the moment with a 503: Certificate Expired, here's an archive.org URL that worked for me to verify that /meta is indeed under their REST API.

Link to GitHub API docs: https://docs.github.com/en/[email protected]/rest/reference/meta

Merge request reports

Loading