(ctx context.Context, repository *git.Repository, remoteName string, url string)
| 73 | } |
| 74 | |
| 75 | func deleteThenCreateRemoteInRepository(ctx context.Context, repository *git.Repository, remoteName string, url string) error { |
| 76 | err := repository.DeleteRemote(remoteName) |
| 77 | if err != nil { |
| 78 | return errors.Wrap(ctx, err, "delete the Git remote") |
| 79 | } |
| 80 | return createRemoteInRepository(ctx, repository, remoteName, url) |
| 81 | } |
| 82 | |
| 83 | func repositoryHasRemote(ctx context.Context, repository *git.Repository, remoteName string) (bool, error) { |
| 84 | config, err := repository.Storer.Config() |
no test coverage detected