Home / Function/ getWorkflowRun() — react Function Reference

getWorkflowRun() — react Function Reference

Architecture documentation for the getWorkflowRun() function in download-build-artifacts.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  49e297f4_16bd_0ef1_1200_9acfefde5146["getWorkflowRun()"]
  b7e2774f_9b65_2f26_1d36_abceee1db3ae["download-build-artifacts.js"]
  49e297f4_16bd_0ef1_1200_9acfefde5146 -->|defined in| b7e2774f_9b65_2f26_1d36_abceee1db3ae
  a9106a40_7dcd_d923_0663_c543c16b405d["downloadArtifactsFromGitHub()"]
  a9106a40_7dcd_d923_0663_c543c16b405d -->|calls| 49e297f4_16bd_0ef1_1200_9acfefde5146
  bb2f5901_75d0_9ae0_3f8d_b59cdfdd8785["getWorkflowId()"]
  49e297f4_16bd_0ef1_1200_9acfefde5146 -->|calls| bb2f5901_75d0_9ae0_3f8d_b59cdfdd8785
  style 49e297f4_16bd_0ef1_1200_9acfefde5146 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/release/shared-commands/download-build-artifacts.js lines 50–66

async function getWorkflowRun(commit) {
  const res = await exec(
    `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}`
  );

  const json = JSON.parse(res.stdout);
  const workflowRun = json.workflow_runs.find(run => run.head_sha === commit);

  if (workflowRun == null || workflowRun.id == null) {
    console.log(
      theme`{error The workflow run for the specified commit (${commit}) could not be found.}`
    );
    process.exit(1);
  }

  return workflowRun;
}

Domain

Subdomains

Frequently Asked Questions

What does getWorkflowRun() do?
getWorkflowRun() is a function in the react codebase, defined in scripts/release/shared-commands/download-build-artifacts.js.
Where is getWorkflowRun() defined?
getWorkflowRun() is defined in scripts/release/shared-commands/download-build-artifacts.js at line 50.
What does getWorkflowRun() call?
getWorkflowRun() calls 1 function(s): getWorkflowId.
What calls getWorkflowRun()?
getWorkflowRun() is called by 1 function(s): downloadArtifactsFromGitHub.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free