Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 807498f commit 2dee099Copy full SHA for 2dee099
github.js
@@ -54,11 +54,8 @@
54
};
55
xhr.setRequestHeader('Accept','application/vnd.github.raw');
56
xhr.setRequestHeader('Content-Type','application/json');
57
- if (
58
- (options.auth == 'oauth' && options.token) ||
59
- (options.auth == 'basic' && options.username && options.password)
60
- ) {
61
- xhr.setRequestHeader('Authorization',options.auth == 'oauth'
+ if ( (options.token) || (options.username && options.password)) {
+ xhr.setRequestHeader('Authorization', options.token
62
? 'token '+ options.token
63
: 'Basic ' + Base64.encode(options.username + ':' + options.password)
64
);
0 commit comments