MCPcopy Create free account
hub / github.com/cli/cli / waitForRepositoryReady

Function waitForRepositoryReady

acceptance/acceptance_test.go:184–198  ·  view source on GitHub ↗
(check func() (bool, error), sleep func(time.Duration))

Source from the content-addressed store, hash-verified

182}
183
184func waitForRepositoryReady(check func() (bool, error), sleep func(time.Duration)) error {
185 for attempt := 0; attempt < repositoryReadyPollAttempts; attempt++ {
186 ready, err := check()
187 if err != nil {
188 return err
189 }
190 if ready {
191 return nil
192 }
193 if attempt < repositoryReadyPollAttempts-1 {
194 sleep(repositoryReadyPollInterval)
195 }
196 }
197 return errors.New("repository did not finish initializing within 30 seconds")
198}
199
200func waitForWorkflowRunStatus(view func() (string, error), expected string, sleep func(time.Duration)) error {
201 for attempt := 0; attempt < workflowRunStatusPollAttempts; attempt++ {

Calls 1

checkStruct · 0.85

Tested by

no test coverage detected