Remove an unneeded if.

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
Chris Gavin
2022-08-11 17:08:34 +01:00
parent bbdc9efa94
commit 7c6fa5ce8a
3 changed files with 3 additions and 9 deletions

View File

@@ -38,10 +38,7 @@ export const getApiClient = function (
const auth =
(allowExternal && apiDetails.externalRepoAuth) || apiDetails.auth;
const retryingOctokit = githubUtils.GitHub.plugin(retry.retry);
let apiURL = apiDetails.apiURL;
if (!apiURL) {
apiURL = deriveApiUrl(apiDetails.url);
}
const apiURL = apiDetails.apiURL || deriveApiUrl(apiDetails.url);
return new retryingOctokit(
githubUtils.getOctokitOptions(auth, {
baseUrl: apiURL,