gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

`migrate-repo` command retries 5 times if target repository exists

Open akordowski opened this issue 2 months ago • 0 comments

Description

When calling the migrate-repo command it is checked if the target repository already exists. If the repository is found then the check method retries the call 5 time before throwing a exception. This is the call stack:

https://github.com/github/gh-gei/blob/b380004c8ab8bd1e2a4bec9c9aafedd42c9f7026/src/Octoshift/Services/GithubApi.cs#L170-L186

https://github.com/github/gh-gei/blob/b380004c8ab8bd1e2a4bec9c9aafedd42c9f7026/src/Octoshift/Services/GithubClient.cs#L48

The GetNonSuccessAsync() function calls a GetWithRetry() by passing an expected HttpStatusCode.

IMO the GetNonSuccessAsync() function should call a sub-function without retry and should fail if the expected HttpStatusCode is returned, or is this behavior intentional?

Reproduction Steps

Run a migration against an existing repository.

akordowski avatar Oct 27 '25 09:10 akordowski