Compare commits

..

1 Commits

Author SHA1 Message Date
Milos Pantic
32c05c3a4a
Merge d87ca55394 into a2374547df 2023-12-01 05:50:55 -08:00
3 changed files with 3 additions and 11 deletions

View File

@ -87931,11 +87931,9 @@ function getGitHubHttpHeaders() {
const token = core.getInput('token'); const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`; const auth = !token ? undefined : `token ${token}`;
const headers = { const headers = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw' accept: 'application/vnd.github.VERSION.raw'
}; };
if (auth) {
headers.authorization = auth;
}
return headers; return headers;
} }
exports.getGitHubHttpHeaders = getGitHubHttpHeaders; exports.getGitHubHttpHeaders = getGitHubHttpHeaders;

4
dist/setup/index.js vendored
View File

@ -125282,11 +125282,9 @@ function getGitHubHttpHeaders() {
const token = core.getInput('token'); const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`; const auth = !token ? undefined : `token ${token}`;
const headers = { const headers = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw' accept: 'application/vnd.github.VERSION.raw'
}; };
if (auth) {
headers.authorization = auth;
}
return headers; return headers;
} }
exports.getGitHubHttpHeaders = getGitHubHttpHeaders; exports.getGitHubHttpHeaders = getGitHubHttpHeaders;

View File

@ -166,13 +166,9 @@ export function convertVersionToSemver(version: number[] | string) {
export function getGitHubHttpHeaders(): OutgoingHttpHeaders { export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
const token = core.getInput('token'); const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`; const auth = !token ? undefined : `token ${token}`;
const headers: OutgoingHttpHeaders = { const headers: OutgoingHttpHeaders = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw' accept: 'application/vnd.github.VERSION.raw'
}; };
if (auth) {
headers.authorization = auth;
}
return headers; return headers;
} }