Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
jhutchings1 authored Aug 26, 2024
1 parent 6b81b8e commit 8ad6ba7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions componentDetection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,18 @@ export default class ComponentDetection {
private static async getLatestReleaseURL(): Promise<string> {
var githubToken = core.getInput('token') || process.env.GITHUB_TOKEN || "";

// If the releaseServerUrl is set to a different value than the default, then use an empty string as the token
// If the releaseServerUrl is set, then use an empty string as the token
if (core.getInput('releaseServerUrl') != null) {
githubToken = "";
}
const serverUrl = core.getInput('releaseServerUrl') || github.context.apiUrl;
//const octokit = github.getOctokit(githubToken, { baseUrl: serverUrl });
const octokit = new Octokit({ auth: githubToken, baseUrl: serverUrl, request: { fetch: fetch}, log: {
debug: core.debug,
info: core.info,
warn: core.warning,
error: core.error
}, });

const owner = "microsoft";
const repo = "component-detection";
core.debug("Attempting to download latest release from " + serverUrl);
Expand Down
3 changes: 1 addition & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 8ad6ba7

Please sign in to comment.