mirror of
https://gitea.com/actions/setup-java.git
synced 2025-12-18 09:20:51 +08:00
Add GitHub Token Support for GraalVM and Refactor Code (#849)
* Code updated to let code accept github token and refactored the code. * github token accept through environment variable * fix test error * audit fix commit * update package-lock.json * Update GraalVM Tests * Lint Issue Resolve * Update Test case for Windows * update with enhance code and test
This commit is contained in:
@@ -184,8 +184,8 @@ export function convertVersionToSemver(version: number[] | string) {
|
||||
}
|
||||
|
||||
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
|
||||
const token = core.getInput('token');
|
||||
const auth = !token ? undefined : `token ${token}`;
|
||||
const resolvedToken = core.getInput('token') || process.env.GITHUB_TOKEN;
|
||||
const auth = !resolvedToken ? undefined : `token ${resolvedToken}`;
|
||||
|
||||
const headers: OutgoingHttpHeaders = {
|
||||
accept: 'application/vnd.github.VERSION.raw'
|
||||
|
||||
Reference in New Issue
Block a user