File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,9 @@ module.exports = withDocsInfra({
150
150
} ;
151
151
} ,
152
152
env : {
153
- GITHUB_AUTH : process . env . GITHUB_AUTH ,
153
+ GITHUB_AUTH : process . env . GITHUB_AUTH
154
+ ? `Basic ${ Buffer . from ( process . env . GITHUB_AUTH ) . toString ( 'base64' ) } `
155
+ : null ,
154
156
LIB_VERSION : pkg . version ,
155
157
FEEDBACK_URL : process . env . FEEDBACK_URL ,
156
158
SLACK_FEEDBACKS_TOKEN : process . env . SLACK_FEEDBACKS_TOKEN ,
Original file line number Diff line number Diff line change @@ -22,13 +22,10 @@ function formatVersion(version) {
22
22
}
23
23
24
24
async function getBranches ( ) {
25
- // TODO: find an appropriate way to prevent "API rate limit exceeded"
26
- // const githubAuthorizationToken = process.env.GITHUB_AUTH || '';
27
-
28
25
const result = await fetch ( 'https://api.github.com/repos/mui/material-ui-docs/branches' , {
29
- // headers: {
30
- // Authorization: `Basic ${Buffer.from(githubAuthorizationToken).toString('base64')}` ,
31
- // },
26
+ headers : {
27
+ Authorization : process . env . GITHUB_AUTH ,
28
+ } ,
32
29
} ) ;
33
30
const text = await result . text ( ) ;
34
31
You can’t perform that action at this time.
0 commit comments