Set timeout as const variable per comments
Signed-off-by: Nicolas Arnold <nic@roadie.io>
This commit is contained in:
@@ -22,6 +22,8 @@ import {
|
||||
import { OctokitOptions } from '@octokit/core/dist-types/types';
|
||||
import { parseRepoUrl } from '../publish/util';
|
||||
|
||||
const DEFAULT_TIMEOUT_MS = 60_000;
|
||||
|
||||
export async function getOctokitOptions(options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
credentialsProvider?: GithubCredentialsProvider;
|
||||
@@ -30,9 +32,10 @@ export async function getOctokitOptions(options: {
|
||||
}): Promise<OctokitOptions> {
|
||||
const { integrations, credentialsProvider, repoUrl, token } = options;
|
||||
const { owner, repo, host } = parseRepoUrl(repoUrl, integrations);
|
||||
|
||||
const requestOptions = {
|
||||
// set timeout to 60 seconds
|
||||
timeout: 60_000,
|
||||
timeout: DEFAULT_TIMEOUT_MS,
|
||||
};
|
||||
|
||||
if (!owner) {
|
||||
|
||||
Reference in New Issue
Block a user