Code updated to let code accept github token and refactored the code.

This commit is contained in:
mahabaleshwars 2025-06-06 16:53:23 +05:30
commit 6992528a74
5 changed files with 159 additions and 170 deletions

View file

@ -93676,9 +93676,9 @@ function convertVersionToSemver(version) {
return mainVersion;
}
exports.convertVersionToSemver = convertVersionToSemver;
function getGitHubHttpHeaders() {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
function getGitHubHttpHeaders(token) {
const resolvedToken = token || core.getInput('token');
const auth = !resolvedToken ? undefined : `token ${resolvedToken}`;
const headers = {
accept: 'application/vnd.github.VERSION.raw'
};