Play around with github app credentials

This commit is contained in:
Roberto Hidalgo
2020-03-06 13:30:42 -05:00
committed by Roberto Hidalgo
parent 25cd66daa5
commit 199cdfe192
144 changed files with 35896 additions and 82 deletions

View File

@@ -69,7 +69,7 @@ func (s *GitService) GetRef(ctx context.Context, owner string, repo string, ref
if _, ok := err.(*json.UnmarshalTypeError); ok {
// Multiple refs, means there wasn't an exact match.
return nil, resp, errors.New("multiple matches found for this ref")
} else if resp.StatusCode == 404 {
} else if _, ok := err.(*ErrorResponse); ok && resp.StatusCode == 404 {
// No ref, there was no match for the ref
return nil, resp, errors.New("no match found for this ref")
} else if err != nil {