fix error for ErrReleaseNotFound when fetching ref

This commit is contained in:
ejahnGithub 2025-08-04 20:58:45 -04:00
parent cf7c2b9b8c
commit 1beb8252a7

View file

@ -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