Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea121b8

Browse filesBrowse files
committed
add base-url option
1 parent 1f16022 commit ea121b8
Copy full SHA for ea121b8

File tree

Expand file treeCollapse file tree

2 files changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-1
lines changed

‎action.yml

Copy file name to clipboardExpand all lines: action.yml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ inputs:
2929
retry-exempt-status-codes:
3030
description: A comma separated list of status codes that will NOT be retried e.g. "400,500". No effect unless `retries` is set
3131
default: 400,401,403,404,422 # from https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
32+
base-url:
33+
description: The root of the API URL of the GHES instance to which to connect.
34+
required: false
3235
outputs:
3336
result:
3437
description: The return value of the script, stringified with `JSON.stringify`

‎src/main.ts

Copy file name to clipboardExpand all lines: src/main.ts
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ main().catch(handleError)
1818
type Options = {
1919
log?: Console
2020
userAgent?: string
21+
baseUrl?: string
2122
previews?: string[]
2223
retry?: RetryOptions
2324
request?: RequestRequestOptions
@@ -28,6 +29,7 @@ async function main(): Promise<void> {
2829
const debug = core.getBooleanInput('debug')
2930
const userAgent = core.getInput('user-agent')
3031
const previews = core.getInput('previews')
32+
const baseUrl = core.getInput('base-url')
3133
const retries = parseInt(core.getInput('retries'))
3234
const exemptStatusCodes = parseNumberArray(
3335
core.getInput('retry-exempt-status-codes')
@@ -43,7 +45,8 @@ async function main(): Promise<void> {
4345
userAgent: userAgent || undefined,
4446
previews: previews ? previews.split(',') : undefined,
4547
retry: retryOpts,
46-
request: requestOpts
48+
request: requestOpts,
49+
baseUrl: baseUrl || undefined
4750
}
4851

4952
const github = getOctokit(token, opts, retry, requestLog)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.