Remove throttling option => always disable it

Signed-off-by: Pascal Haakmat <pascalhaakmat@funda.nl>
This commit is contained in:
Pascal Haakmat
2022-09-06 14:30:48 +02:00
parent b757a63253
commit 059e7818cf
@@ -57,7 +57,6 @@ export type CreateGithubPullRequestClientFactoryInput = {
owner: string;
repo: string;
token?: string;
throttling?: boolean;
};
export const defaultClientFactory = async ({
@@ -67,7 +66,6 @@ export const defaultClientFactory = async ({
repo,
host = 'github.com',
token: providedToken,
throttling,
}: CreateGithubPullRequestClientFactoryInput): Promise<OctokitWithPullRequestPluginClient> => {
const [encodedHost, encodedOwner, encodedRepo] = [host, owner, repo].map(
encodeURIComponent,
@@ -83,7 +81,7 @@ export const defaultClientFactory = async ({
const OctokitPR = Octokit.plugin(createPullRequest);
return new OctokitPR({
...octokitOptions,
...(!throttling && { throttle: { enabled: false } }),
...{ throttle: { enabled: false } },
});
};
@@ -134,7 +132,6 @@ export const createPublishGithubPullRequestAction = ({
token?: string;
reviewers?: string[];
teamReviewers?: string[];
throttling?: boolean;
}>({
id: 'publish:github:pull-request',
schema: {
@@ -201,11 +198,6 @@ export const createPublishGithubPullRequestAction = ({
description:
'The teams that will be added as reviewers to the pull request',
},
throttling: {
title: 'Github Throttling',
type: 'boolean',
description: 'Whether to enable Github request throttling',
},
},
},
output: {
@@ -237,7 +229,6 @@ export const createPublishGithubPullRequestAction = ({
token: providedToken,
reviewers,
teamReviewers,
throttling,
} = ctx.input;
const { owner, repo, host } = parseRepoUrl(repoUrl, integrations);
@@ -255,7 +246,6 @@ export const createPublishGithubPullRequestAction = ({
owner,
repo,
token: providedToken,
throttling,
});
const fileRoot = sourcePath