From 059e7818cffa63c5bc0429a4b99439cd4822d3e2 Mon Sep 17 00:00:00 2001 From: Pascal Haakmat Date: Tue, 6 Sep 2022 14:30:48 +0200 Subject: [PATCH] Remove throttling option => always disable it Signed-off-by: Pascal Haakmat --- .../actions/builtin/publish/githubPullRequest.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts index 77a3353b18..d0ee979be3 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/githubPullRequest.ts @@ -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 => { 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