Make anonymous objects into variables for readability

This commit is contained in:
Sam Partington 2020-11-24 11:20:13 +00:00
parent ab9b1a72db
commit 3ee4739b13
15 changed files with 75 additions and 72 deletions

5
lib/api-client.js generated
View file

@ -79,10 +79,11 @@ function getApiUrl(githubUrl) {
// Once all code has been converted this function should be removed or made canonical
// and called only from the action entrypoints.
function getActionsApiClient(allowLocalRun = false) {
return exports.getApiClient({
const apiDetails = {
auth: actions_util_1.getRequiredInput("token"),
url: actions_util_1.getRequiredEnvParam("GITHUB_SERVER_URL"),
}, "actions", logging_1.getActionsLogger(), allowLocalRun);
};
return exports.getApiClient(apiDetails, "actions", logging_1.getActionsLogger(), allowLocalRun);
}
exports.getActionsApiClient = getActionsApiClient;
function apiVersionInRange(version, minimumVersion, maximumVersion) {