Fix parsing base repo out of outdated git remotes
If any of the repositories named by git remotes could not be found via API lookup, a "could not resolve to a Repository" error would be thrown, but the goal of the base repo logic was to ignore NOT_FOUND errors.
This commit is contained in:
parent
25756aaf88
commit
e7029616cb
2 changed files with 4 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ package api
|
|||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
|
@ -422,8 +423,8 @@ func RepoNetwork(client *Client, repos []ghrepo.Interface) (RepoNetworkResult, e
|
|||
%s
|
||||
}
|
||||
`, strings.Join(queries, "")), nil, &graphqlResult)
|
||||
graphqlError, isGraphQLError := err.(*GraphQLError)
|
||||
if isGraphQLError {
|
||||
var graphqlError GraphQLError
|
||||
if errors.As(err, &graphqlError) {
|
||||
// If the only errors are that certain repositories are not found,
|
||||
// continue processing this response instead of returning an error
|
||||
tolerated := true
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ func (s *StatusGetter) LoadSearchResults() error {
|
|||
if len(gqlErrors) == 0 {
|
||||
err = nil
|
||||
} else {
|
||||
err = &api.GraphQLError{
|
||||
err = api.GraphQLError{
|
||||
GQLError: ghAPI.GQLError{
|
||||
Errors: gqlErrors,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue