From 316f8ac4a88220bbf3077079e17c262a6dde5376 Mon Sep 17 00:00:00 2001 From: Marco Lecheler Date: Tue, 16 Apr 2024 21:03:38 +0200 Subject: [PATCH] feat: use GITHUB_API_URL as baseUrl for octokit (#43) * feat: use GITHUB_API_URL as baseUrl for octokit Allow also to connect to GHE instances when using the API URL from the envs * feat: use GITHUB_API_URL as baseUrl for octokit (build) --- dist/index.js | 1 + index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/index.js b/dist/index.js index 61c32ea..732e2fb 100755 --- a/dist/index.js +++ b/dist/index.js @@ -64,6 +64,7 @@ async function main() { const octokit = new Octokit({ auth: `token ${GITHUB_TOKEN}`, + baseUrl: process.env.GITHUB_API_URL || "https://api.github.com", userAgent: "pascalgn/size-label-action" }); diff --git a/index.js b/index.js index 1c9989e..3c3b155 100755 --- a/index.js +++ b/index.js @@ -58,6 +58,7 @@ async function main() { const octokit = new Octokit({ auth: `token ${GITHUB_TOKEN}`, + baseUrl: process.env.GITHUB_API_URL || "https://api.github.com", userAgent: "pascalgn/size-label-action" });