Change octokit from Actions specific one to generic one

This commit is contained in:
Justin Hutchings
2024-08-26 22:49:12 +00:00
committed by GitHub
parent 0f2d542cef
commit 9b4a8182c2
3 changed files with 1734 additions and 1 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
import * as github from '@actions/github'
import * as core from '@actions/core'
import { Octokit, App } from "octokit"
import {
PackageCache,
BuildTarget,
@@ -147,7 +148,8 @@ export default class ComponentDetection {
githubToken = "";
}
const serverUrl = core.getInput('releaseServerUrl') || github.context.apiUrl;
const octokit = github.getOctokit(githubToken, { baseUrl: serverUrl });
//const octokit = github.getOctokit(githubToken, { baseUrl: serverUrl });
const octokit = new Octokit({ auth: githubToken, baseUrl: serverUrl });
const owner = "microsoft";
const repo = "component-detection";
core.debug("Attempting to download latest release from " + serverUrl);
+1730
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -31,6 +31,7 @@
"cross-fetch": "^3.1.5",
"dotenv": "^16.0.3",
"fs": "^0.0.1-security",
"octokit": "^4.0.2",
"tar": "^6.2.1",
"yaml": "^2.2.2"
},