Merge pull request #11451 from cli/eugene/fetch-ref-handle-ReleaseNotFound
fix error for ErrReleaseNotFound when fetching ref
This commit is contained in:
commit
dd26fba80c
1 changed files with 2 additions and 1 deletions
|
|
@ -164,7 +164,8 @@ func FetchRefSHA(ctx context.Context, httpClient *http.Client, repo ghrepo.Inter
|
|||
} `json:"object"`
|
||||
}
|
||||
if err := json.NewDecoder(resp.Body).Decode(&ref); err != nil {
|
||||
return "", err
|
||||
// release not found
|
||||
return "", ErrReleaseNotFound
|
||||
}
|
||||
|
||||
return ref.Object.SHA, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue