MCPcopy Index your code
hub / github.com/react/react / getWorkflowRun

Function getWorkflowRun

scripts/release/shared-commands/download-build-artifacts.js:49–65  ·  view source on GitHub ↗
(commit)

Source from the content-addressed store, hash-verified

47}
48
49async function getWorkflowRun(commit) {
50 const res = await exec(
51 `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}`
52 );
53
54 const json = JSON.parse(res.stdout);
55 const workflowRun = json.workflow_runs.find(run => run.head_sha === commit);
56
57 if (workflowRun == null || workflowRun.id == null) {
58 console.log(
59 theme`{error The workflow run for the specified commit (${commit}) could not be found.}`
60 );
61 process.exit(1);
62 }
63
64 return workflowRun;
65}
66
67async function getArtifact(workflowRunId, artifactName) {
68 const res = await exec(

Callers 1

Calls 4

execFunction · 0.85
getWorkflowIdFunction · 0.85
exitMethod · 0.80
findMethod · 0.65

Tested by

no test coverage detected