From abbc317338a30d4d8bd8ef870026951114e3fdf5 Mon Sep 17 00:00:00 2001 From: Shamil Nunhuck Date: Wed, 9 Jun 2021 22:34:22 +0100 Subject: [PATCH 1/3] Add Base URL as part options --- src/main.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.ts b/src/main.ts index c0668c626..0265e5a3c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,7 @@ type Options = { log?: Console userAgent?: string previews?: string[] + baseUrl?: string } async function main(): Promise { @@ -19,11 +20,13 @@ async function main(): Promise { const debug = core.getInput('debug') const userAgent = core.getInput('user-agent') const previews = core.getInput('previews') + const baseUrl = core.getInput('baseUrl') const opts: Options = {} if (debug === 'true') opts.log = console if (userAgent != null) opts.userAgent = userAgent if (previews != null) opts.previews = previews.split(',') + if (baseUrl != null) opts.baseUrl = baseUrl const github = getOctokit(token, opts) const script = core.getInput('script', {required: true}) From aabc610f5d15552fce772054e15fac7e2e144e3e Mon Sep 17 00:00:00 2001 From: Shamil Nunhuck Date: Wed, 9 Jun 2021 22:36:22 +0100 Subject: [PATCH 2/3] Update action.yml --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 59a1ab789..d44bc4ebf 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,9 @@ inputs: result-encoding: description: Either "string" or "json" (default "json")—how the result will be encoded default: json + baseUrl: + description: The base URL for the GitHub API service instance + default: string outputs: result: description: The return value of the script, stringified with `JSON.stringify` From 928d63fa74a45f6b457e5ce9d5a0888b00e44cea Mon Sep 17 00:00:00 2001 From: Shamil Nunhuck Date: Wed, 9 Jun 2021 22:51:14 +0100 Subject: [PATCH 3/3] Update default baseUrl --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d44bc4ebf..5cacb2121 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,7 @@ inputs: default: json baseUrl: description: The base URL for the GitHub API service instance - default: string + default: https://api.github.com outputs: result: description: The return value of the script, stringified with `JSON.stringify`