File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -142,11 +142,12 @@ export default class ComponentDetection {
142142 private static async getLatestReleaseURL ( ) : Promise < string > {
143143 var githubToken = core . getInput ( 'token' ) || process . env . GITHUB_TOKEN || "" ;
144144
145- // If the releaseServerUrl is github.com and Actions environment is GHES , then use an empty string as the token
146- if ( core . getInput ( 'releaseServerUrl' ) != github . context . apiUrl ) {
145+ // If the releaseServerUrl is set to a different value than the default , then use an empty string as the token
146+ if ( core . getInput ( 'releaseServerUrl' ) != null ) {
147147 githubToken = "" ;
148148 }
149- const octokit = github . getOctokit ( githubToken , { baseUrl : core . getInput ( 'releaseServerUrl' ) } ) ;
149+ const serverUrl = core . getInput ( 'releaseServerUrl' ) || github . context . apiUrl ;
150+ const octokit = github . getOctokit ( githubToken , { baseUrl : serverUrl } ) ;
150151 const owner = "microsoft" ;
151152 const repo = "component-detection" ;
152153
You can’t perform that action at this time.
0 commit comments