File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -87931,9 +87931,11 @@ function getGitHubHttpHeaders() {
87931
87931
const token = core.getInput('token');
87932
87932
const auth = !token ? undefined : `token ${token}`;
87933
87933
const headers = {
87934
- authorization: auth,
87935
87934
accept: 'application/vnd.github.VERSION.raw'
87936
87935
};
87936
+ if (auth) {
87937
+ headers.authorization = auth;
87938
+ }
87937
87939
return headers;
87938
87940
}
87939
87941
exports.getGitHubHttpHeaders = getGitHubHttpHeaders;
Original file line number Diff line number Diff line change @@ -125282,9 +125282,11 @@ function getGitHubHttpHeaders() {
125282
125282
const token = core.getInput('token');
125283
125283
const auth = !token ? undefined : `token ${token}`;
125284
125284
const headers = {
125285
- authorization: auth,
125286
125285
accept: 'application/vnd.github.VERSION.raw'
125287
125286
};
125287
+ if (auth) {
125288
+ headers.authorization = auth;
125289
+ }
125288
125290
return headers;
125289
125291
}
125290
125292
exports.getGitHubHttpHeaders = getGitHubHttpHeaders;
Original file line number Diff line number Diff line change @@ -166,9 +166,13 @@ export function convertVersionToSemver(version: number[] | string) {
166
166
export function getGitHubHttpHeaders ( ) : OutgoingHttpHeaders {
167
167
const token = core . getInput ( 'token' ) ;
168
168
const auth = ! token ? undefined : `token ${ token } ` ;
169
+
169
170
const headers : OutgoingHttpHeaders = {
170
- authorization : auth ,
171
171
accept : 'application/vnd.github.VERSION.raw'
172
172
} ;
173
+
174
+ if ( auth ) {
175
+ headers . authorization = auth ;
176
+ }
173
177
return headers ;
174
178
}
You can’t perform that action at this time.
0 commit comments