MCPcopy Create free account
hub / github.com/github/gh-aw / fetchLocalExperimentDetails

Function fetchLocalExperimentDetails

pkg/cli/experiments_command.go:563–577  ·  view source on GitHub ↗

fetchLocalExperimentDetails reads the state.json from a local experiment branch.

(branchName, workflowID string)

Source from the content-addressed store, hash-verified

561
562// fetchLocalExperimentDetails reads the state.json from a local experiment branch.
563func fetchLocalExperimentDetails(branchName, workflowID string) (*ExperimentDetails, error) {
564 experimentsLog.Printf("Fetching local experiment details: branch=%s", branchName)
565
566 ref := "origin/" + branchName
567 if !gitRefExists(ref) {
568 if !gitRefExists(branchName) {
569 return nil, fmt.Errorf("experiment branch %q not found locally (tried origin/%s and %s)",
570 branchName, branchName, branchName)
571 }
572 ref = branchName
573 }
574
575 state := readLocalExperimentState(ref)
576 return experimentDetailsFromState(workflowID, branchName, state), nil
577}
578
579// fetchRemoteExperimentDetails reads the state.json from a remote experiment branch.
580func fetchRemoteExperimentDetails(repoOverride, branchName, workflowID string) (*ExperimentDetails, error) {

Callers 1

RunExperimentsAnalyzeFunction · 0.85

Calls 5

gitRefExistsFunction · 0.85
readLocalExperimentStateFunction · 0.85
PrintfMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected