File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -87931,9 +87931,11 @@ function getGitHubHttpHeaders() {
8793187931 const token = core.getInput('token');
8793287932 const auth = !token ? undefined : `token ${token}`;
8793387933 const headers = {
87934- authorization: auth,
8793587934 accept: 'application/vnd.github.VERSION.raw'
8793687935 };
87936+ if (auth) {
87937+ headers.authorization = auth;
87938+ }
8793787939 return headers;
8793887940}
8793987941exports.getGitHubHttpHeaders = getGitHubHttpHeaders;
Original file line number Diff line number Diff line change @@ -125282,9 +125282,11 @@ function getGitHubHttpHeaders() {
125282125282 const token = core.getInput('token');
125283125283 const auth = !token ? undefined : `token ${token}`;
125284125284 const headers = {
125285- authorization: auth,
125286125285 accept: 'application/vnd.github.VERSION.raw'
125287125286 };
125287+ if (auth) {
125288+ headers.authorization = auth;
125289+ }
125288125290 return headers;
125289125291}
125290125292exports.getGitHubHttpHeaders = getGitHubHttpHeaders;
Original file line number Diff line number Diff line change @@ -166,9 +166,13 @@ export function convertVersionToSemver(version: number[] | string) {
166166export function getGitHubHttpHeaders ( ) : OutgoingHttpHeaders {
167167 const token = core . getInput ( 'token' ) ;
168168 const auth = ! token ? undefined : `token ${ token } ` ;
169+
169170 const headers : OutgoingHttpHeaders = {
170- authorization : auth ,
171171 accept : 'application/vnd.github.VERSION.raw'
172172 } ;
173+
174+ if ( auth ) {
175+ headers . authorization = auth ;
176+ }
173177 return headers ;
174178}
You can’t perform that action at this time.
0 commit comments