Skip to content

Commit 1005f9c

Browse files
steve21168dscho
andauthored
Add support for using action with Github Enterprise server (#148)
Co-authored-by: Johannes Schindelin <[email protected]>
1 parent 3fa832d commit 1005f9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12631,9 +12631,9 @@ async function run() {
1263112631

1263212632
let newSessionExtra = ""
1263312633
if (core.getInput("limit-access-to-actor") === "true") {
12634-
const { actor } = github.context
12634+
const { actor, apiUrl } = github.context
1263512635
const auth = core.getInput('github-token')
12636-
const octokit = new dist_node/* Octokit */.v({ auth })
12636+
const octokit = new dist_node/* Octokit */.v({ auth, baseUrl: apiUrl })
1263712637

1263812638
const keys = await octokit.users.listPublicKeysForUser({
1263912639
username: actor

src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ export async function run() {
8080

8181
let newSessionExtra = ""
8282
if (core.getInput("limit-access-to-actor") === "true") {
83-
const { actor } = github.context
83+
const { actor, apiUrl } = github.context
8484
const auth = core.getInput('github-token')
85-
const octokit = new Octokit({ auth })
85+
const octokit = new Octokit({ auth, baseUrl: apiUrl })
8686

8787
const keys = await octokit.users.listPublicKeysForUser({
8888
username: actor

0 commit comments

Comments
 (0)