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

View file

@ -108,15 +108,12 @@ function getApiUrl(githubUrl: string): string {
// Once all code has been converted this function should be removed or made canonical
// and called only from the action entrypoints.
export function getActionsApiClient(allowLocalRun = false) {
return getApiClient(
{
auth: getRequiredInput("token"),
url: getRequiredEnvParam("GITHUB_SERVER_URL"),
},
"actions",
getActionsLogger(),
allowLocalRun
);
const apiDetails = {
auth: getRequiredInput("token"),
url: getRequiredEnvParam("GITHUB_SERVER_URL"),
};
return getApiClient(apiDetails, "actions", getActionsLogger(), allowLocalRun);
}
export function apiVersionInRange(