Home / Function/ getPublishWorkflowID() — react Function Reference

getPublishWorkflowID() — react Function Reference

Architecture documentation for the getPublishWorkflowID() function in publish-using-ci-workflow.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  7c5d17c6_9bfc_99f7_f961_0798168fa07a["getPublishWorkflowID()"]
  37d61257_7834_7ff9_7756_2c4472479997["publish-using-ci-workflow.js"]
  7c5d17c6_9bfc_99f7_f961_0798168fa07a -->|defined in| 37d61257_7834_7ff9_7756_2c4472479997
  7f9da990_f5b0_b840_dce2_63cf0c639a81["main()"]
  7f9da990_f5b0_b840_dce2_63cf0c639a81 -->|calls| 7c5d17c6_9bfc_99f7_f961_0798168fa07a
  4ed76040_992b_9e9e_bb8b_ff567ba35102["sleep()"]
  7c5d17c6_9bfc_99f7_f961_0798168fa07a -->|calls| 4ed76040_992b_9e9e_bb8b_ff567ba35102
  style 7c5d17c6_9bfc_99f7_f961_0798168fa07a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/release/publish-using-ci-workflow.js lines 26–44

async function getPublishWorkflowID(pipelineID) {
  // Since we just created the pipeline in a POST request, the server may 404.
  // Try a few times before giving up.
  for (let i = 0; i < 20; i++) {
    const pipelineWorkflowsResponse = await fetch(
      `https://circleci.com/api/v2/pipeline/${pipelineID}/workflow`
    );
    if (pipelineWorkflowsResponse.ok) {
      const pipelineWorkflowsJSON = await pipelineWorkflowsResponse.json();
      const workflows = pipelineWorkflowsJSON.items;
      if (workflows.length !== 0) {
        return workflows[0].id;
      }
    }
    // CircleCI server may be stale. Wait a sec and try again.
    await sleep(1000);
  }
  return null;
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does getPublishWorkflowID() do?
getPublishWorkflowID() is a function in the react codebase, defined in scripts/release/publish-using-ci-workflow.js.
Where is getPublishWorkflowID() defined?
getPublishWorkflowID() is defined in scripts/release/publish-using-ci-workflow.js at line 26.
What does getPublishWorkflowID() call?
getPublishWorkflowID() calls 1 function(s): sleep.
What calls getPublishWorkflowID()?
getPublishWorkflowID() is called by 1 function(s): main.

Analyze Your Own Codebase

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

Try Supermodel Free