Public
Edited
Jul 29, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
repo = "opencollective/opencollective-frontend"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
isSample = repo === "sveltejs/svelte" && !hasApiKey
Insert cell
// Once authenticated:
// workflows = fetchWorkflows(repo)
workflows = isSample ? sampleWorkflows : fetchWorkflows(repo)
Insert cell
// Once authenticated:
// runs = fetchRuns(repo, workflow.id)
runs = isSample ? sampleRuns : fetchRuns(repo, workflow.id)
Insert cell
branches = new Set(runs.map(r => r.head_branch))
Insert cell
Insert cell
jobs = parseJobs(runs)
.filter((job) => !branch || job.run.head_branch === branch) // filter to the selected branch
// Determine which jobs should be considered "integration tests" by defining filtering criteria below
.filter((job) => {
// For example you could filter on the name of the job:
// return job.name.indexOf("Test") >= 0
// by default we visualize all of the jobs
return true
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
prettyConclusion = (d) => {
if(d == "success") return "✅ success"
if(d == "failure") return "⛔️ failure"
if(d == "cancelled") return "⬜️ cancelled"
return d
}
Insert cell
color = ({domain: ["cancelled", "failure", "success"], range: ["gray", "#cb2431", "#2cbe4e"]})
Insert cell
timeParser = d3.timeParse("%Y-%m-%dT%H:%M:%S%Z")
Insert cell
timeFormat = d3.timeFormat("%a %m/%d %I:%M")
Insert cell
Insert cell
Insert cell
import {fetchWorkflows, fetchRuns, parseJobs, sampleWorkflows, sampleRuns, rateLimitSummary, hasApiKey, apiKeyStatus} from "@observablehq/github-actions-workflows-api"
Insert cell
Plot = require("@observablehq/plot@0.1").then(addTooltip)
Insert cell
import {addTooltip} from "@fil/experimental-plot-tooltip-01"
Insert cell
import {toc} from "@observablehq/templates-table-of-instructions"
Insert cell
// For a notebook to access Secrets, it must statically reference one; this cell grants Secret access to the notebook from which we import the GitHub API helpers. `undefined` stops the Secret from appearing in the Inspector.
undefined && Secret("GITHUB_ACCESS_TOKEN")
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more