From 1576b81865103b13bba07b75980a3688c1804bfa Mon Sep 17 00:00:00 2001 From: Barry Gordon Date: Mon, 18 Oct 2021 18:24:43 +0100 Subject: [PATCH] Add workingDirectory to inputs --- __tests__/api_client.test.ts | 3 ++- __tests__/updater-integration.test.ts | 3 ++- src/api-client.ts | 3 ++- src/inputs.ts | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/__tests__/api_client.test.ts b/__tests__/api_client.test.ts index bf5a4e7..a127ed9 100644 --- a/__tests__/api_client.test.ts +++ b/__tests__/api_client.test.ts @@ -9,7 +9,8 @@ describe('ApiClient', () => { jobToken: 'xxx', credentialsToken: 'yyy', dependabotApiUrl: 'https://localhost', - dependabotApiDockerUrl: 'https://localhost' + dependabotApiDockerUrl: 'https://localhost', + workingDirectory: 'nyi' }) beforeEach(jest.clearAllMocks) diff --git a/__tests__/updater-integration.test.ts b/__tests__/updater-integration.test.ts index 10be81d..88e747a 100644 --- a/__tests__/updater-integration.test.ts +++ b/__tests__/updater-integration.test.ts @@ -23,7 +23,8 @@ describe('Updater', () => { 'job-token', 'cred-token', dependabotApiUrl, - dependabotApiDockerUrl + dependabotApiDockerUrl, + 'nyi-workingDirectory' ) const client = axios.create({baseURL: dependabotApiUrl}) diff --git a/src/api-client.ts b/src/api-client.ts index ec0c6f5..762892f 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -7,7 +7,8 @@ export class JobParameters { readonly jobToken: string, readonly credentialsToken: string, readonly dependabotApiUrl: string, - readonly dependabotApiDockerUrl: string + readonly dependabotApiDockerUrl: string, + readonly workingDirectory: string ) {} } diff --git a/src/inputs.ts b/src/inputs.ts index 3f181e0..28e9e34 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -31,6 +31,7 @@ function fromWorkflowInputs(ctx: Context): JobParameters { evt.inputs.jobToken as string, evt.inputs.credentialsToken as string, evt.inputs.dependabotApiUrl as string, - dependabotApiDockerUrl as string + dependabotApiDockerUrl as string, + evt.inputs.workingDirectory as string ) }