RemoteForRepo finds the git remote that points to a repository
(repo ghrepo.Interface)
| 163 | |
| 164 | // RemoteForRepo finds the git remote that points to a repository |
| 165 | func (r *ResolvedRemotes) RemoteForRepo(repo ghrepo.Interface) (*Remote, error) { |
| 166 | for _, remote := range r.remotes { |
| 167 | if ghrepo.IsSame(remote, repo) { |
| 168 | return remote, nil |
| 169 | } |
| 170 | } |
| 171 | return nil, errors.New("not found") |
| 172 | } |
no test coverage detected