(ctx context.Context, repository *git.Repository, remoteName string)
| 81 | } |
| 82 | |
| 83 | func repositoryHasRemote(ctx context.Context, repository *git.Repository, remoteName string) (bool, error) { |
| 84 | config, err := repository.Storer.Config() |
| 85 | if err != nil { |
| 86 | return false, errors.Wrapf(ctx, err, "fail to get Git repository config for remote %s", remoteName) |
| 87 | } |
| 88 | |
| 89 | if _, has := config.Remotes[remoteName]; has { |
| 90 | return true, nil |
| 91 | } |
| 92 | return false, nil |
| 93 | } |
no outgoing calls
no test coverage detected