diff --git a/__test__/New Text Document.txt b/__test__/New Text Document.txt new file mode 100644 index 000000000..e69de29bb diff --git a/__test__/async-function.test.ts b/__test__/async-function.test.ts index d68b3023e..eb2c3fdb3 100644 --- a/__test__/async-function.test.ts +++ b/__test__/async-function.test.ts @@ -11,18 +11,4 @@ describe('callAsyncFunction', () => { test('throws on ReferenceError', async () => { expect.assertions(1) - try { - await callAsyncFunction({} as any, 'proces') - } catch (err) { - expect(err).toBeInstanceOf(ReferenceError) - } - }) - - test('can access process', async () => { - await callAsyncFunction({} as any, 'process') - }) - - test('can access console', async () => { - await callAsyncFunction({} as any, 'console') - }) -}) +ddddddddddddddddddddddddddddddddddddddd \ No newline at end of file diff --git a/src/New Text Document.txt b/src/New Text Document.txt new file mode 100644 index 000000000..e69de29bb diff --git a/src/async-function.ts b/src/async-function.ts index 84035f222..a36a25d3e 100644 --- a/src/async-function.ts +++ b/src/async-function.ts @@ -19,10 +19,4 @@ export declare type AsyncFunctionArguments = { __original_require__: NodeRequire } -export function callAsyncFunction( - args: AsyncFunctionArguments, - source: string -): Promise { - const fn = new AsyncFunction(...Object.keys(args), source) - return fn(...Object.values(args)) -} +/ \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index baa2933dc..b1e46f18e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,20 +23,7 @@ type Options = { request?: RequestRequestOptions } -async function main(): Promise { - const token = core.getInput('github-token', {required: true}) - const debug = core.getBooleanInput('debug') - const userAgent = core.getInput('user-agent') - const previews = core.getInput('previews') - const baseUrl = core.getInput('base-url') - const retries = parseInt(core.getInput('retries')) - const exemptStatusCodes = parseNumberArray( - core.getInput('retry-exempt-status-codes') - ) - const [retryOpts, requestOpts] = getRetryOptions( - retries, - exemptStatusCodes, - defaultGitHubOptions + ) const opts: Options = { @@ -73,7 +60,7 @@ async function main(): Promise { ) let encoding = core.getInput('result-encoding') - encoding = encoding ? encoding : 'json' +aaaa encoding = encoding ? encoding : 'json' let output diff --git a/src/retry-options.ts b/src/retry-options.ts index 683beaade..c91823eb8 100644 --- a/src/retry-options.ts +++ b/src/retry-options.ts @@ -7,17 +7,7 @@ export type RetryOptions = { enabled?: boolean } -export function getRetryOptions( - retries: number, - exemptStatusCodes: number[], - defaultOptions: OctokitOptions -): [RetryOptions, RequestRequestOptions | undefined] { - if (retries <= 0) { - return [{enabled: false}, defaultOptions.request] - } - - const retryOptions: RetryOptions = { - enabled: true +fgffffffffffffffffffffffffffffffffff } if (exemptStatusCodes.length > 0) { diff --git a/src/wrap-require.ts b/src/wrap-require.ts index c0624767d..3837e398a 100644 --- a/src/wrap-require.ts +++ b/src/wrap-require.ts @@ -19,7 +19,4 @@ export const wrapRequire = new Proxy(__non_webpack_require__, { return target.apply(thisArg, [modulePath]) }, - get: (target, prop, receiver) => { - Reflect.get(target, prop, receiver) - } -}) +/ \ No newline at end of file