Skip to content

Commit

Permalink
Add support for using action with Github Enterprise server (#148)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Schindelin <[email protected]>
  • Loading branch information
steve21168 and dscho authored Jan 9, 2023
1 parent 3fa832d commit 1005f9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12631,9 +12631,9 @@ async function run() {

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

const keys = await octokit.users.listPublicKeysForUser({
username: actor
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export async function run() {

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

const keys = await octokit.users.listPublicKeysForUser({
username: actor
Expand Down

0 comments on commit 1005f9c

Please sign in to comment.