File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,13 @@ Follow these steps to set up the development environment for the Kata Containers
7676
7777 Create the .env file:
7878 ``` bash
79- NODE_ENV=development
8079 TOKEN=< GITHUB_PAT_OR_OTHER_VALID_TOKEN>
8180 ```
8281
8382 Create the folder /localData. Then, run:
8483
8584 ``` bash
86- node scripts/fetch-ci-nightly-data.js > localData/job_stats.json
85+ NODE_ENV=development node scripts/fetch-ci-nightly-data.js > localData/job_stats.json
8786 npm run dev # On Windows, run `npm run win-dev` instead.
8887 ```
8988 The app will be available at [ http://localhost:3000 ] ( http://localhost:3000 ) .
109108 NEXT_PUBLIC_BASE_PATH: ${{ vars.NEXT_PUBLIC_BASE_PATH } }
110109```
111110If the variable is undefined, it will use "" for the basePath and assume the site is being served at root.
112- This makes it easier for people to fork the repo and deploy with GitHub pages such that they can have a preview for their PR.
111+ This makes it easier for people to fork the repo and deploy with GitHub pages such that they can have a preview for their PR.
Original file line number Diff line number Diff line change 1111// entry is information about a job and how it has performed over the last
1212// few runs (e.g. pass or fail).
1313//
14- // To run locally:
15- // node --require dotenv/config scripts/fetch-ci-nightly-data.js
16- //
17- // .env file with:
18- // NODE_ENV=development
19- // TOKEN=token <GITHUB_PAT_OR_OTHER_VALID_TOKEN>
14+ const dotenv = require ( "dotenv" ) ;
2015
2116// Set token used for making Authorized GitHub API calls.
2217// In dev, set by .env file; in prod, set by GitHub Secret.
2318if ( process . env . NODE_ENV === "development" ) {
24- require ( ' dotenv' ) . config ( ) ;
19+ dotenv . config ( ) ;
2520}
2621const TOKEN = process . env . TOKEN ;
2722
@@ -42,7 +37,7 @@ const main_branch_url = "https://api.github.com/repos/" +
4237 "kata-containers/kata-containers/branches/main" ;
4338
4439// The number of jobs to fetch from the github API on each paged request.
45- const jobs_per_request = 100 ;
40+ const jobs_per_request = 50 ;
4641
4742// Count of the number of fetches.
4843let fetch_count = 0 ;
@@ -92,7 +87,7 @@ function get_job_data(run) {
9287 } ) ;
9388
9489 if ( ! response . ok ) {
95- throw new Error ( `Failed to fetch jobs: ${ response . status } : ` +
90+ throw new Error ( `Failed to fetch jobs from ${ jobs_url } : ${ response . status } : ` +
9691 `${ response . statusText } ` ) ;
9792 }
9893 const json = await response . json ( ) ;
You can’t perform that action at this time.
0 commit comments