-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard: Add view for PR runs #23
base: main
Are you sure you want to change the base?
Conversation
cdc6a92
to
8405c7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes changes changes D:
df17116
to
af17d13
Compare
pages/index.js
Outdated
const [loading, setLoading] = useState(true); | ||
const [jobs, setJobs] = useState([]); | ||
const [checks, setChecks] = useState([]); | ||
const [rowsPR, setRowsPR] = useState([]); | ||
const [rowsNightly, setRowsNightly] = useState([]); | ||
const [expandedRows, setExpandedRows] = useState([]); | ||
const [display, setDisplay] = useState("nightly"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we revert the spacing changes here? While it looks nicer, it can be annoying to maintain without requiring a linter.
scripts/fetch-ci-nightly-data.js
Outdated
|
||
// Set token used for making Authorized GitHub API calls. | ||
// In dev, set by .env file; in prod, set by GitHub Secret. | ||
require('dotenv').config(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work when ran by GH Actions?
scripts/fetch-ci-nightly-data.js
Outdated
} | ||
const json = await response.json(); | ||
fetch_count++; | ||
return await json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return await
is an anti-pattern. You can use just return
.
scripts/fetch-ci-nightly-data.js
Outdated
@@ -146,78 +122,16 @@ function get_job_data(run) { | |||
conclusion: null, | |||
jobs: [], | |||
}; | |||
if (run["status"] == "in_progress") { | |||
if (run["status"] === "in_progress") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're increasing how strict we are? Generally curious.
scripts/fetch-ci-pr-data.js
Outdated
|
||
|
||
// Set token used for making Authorized GitHub API calls | ||
require('dotenv').config(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above
Added a script that fetches PR data and created a separate view on the dashboard. Tweaked dotenv require. Fixes kata-containers#1 Signed-off-by: Anna Finn <[email protected]>
Needed
To Do
Description
Testing
Tested in production with data fetched from:
instead of:
Data must be refetched before pushing (see Needed above)
Nightly View:
PR View