Skip to content

Commit 566ec5e

Browse files
committed
Get GitHub API URL from env var
1 parent 17cde8a commit 566ec5e

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

dist/main.cjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15061,7 +15061,8 @@ async function main(appId2, privateKey2, repository2, core3, createAppAuth2, req
1506115061
repo,
1506215062
headers: {
1506315063
authorization: `bearer ${appAuthentication.token}`
15064-
}
15064+
},
15065+
baseUrl: process.env["GITHUB_API_URL"]
1506515066
}
1506615067
);
1506715068
const authentication = await auth({

lib/main.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import core from "@actions/core";
44
import { createAppAuth } from "@octokit/auth-app";
55
import { request } from "@octokit/request";
66

7+
request.defaults({
8+
baseUrl: process.env["GITHUB_API_URL"],
9+
});
10+
711
/**
812
* @param {string} appId
913
* @param {string} privateKey

lib/post.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import core from "@actions/core";
44
import { request } from "@octokit/request";
55

6+
request.defaults({
7+
baseUrl: process.env["GITHUB_API_URL"],
8+
});
9+
610
/**
711
* @param {core} core
812
* @param {request} request
@@ -11,7 +15,7 @@ export async function post(core, request) {
1115
const token = core.getState("token");
1216

1317
if (!token) return;
14-
18+
1519
await request("DELETE /installation/token", {
1620
headers: {
1721
authorization: `token ${token}`,

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)