Update api/queries_branch_issue_reference.go

Co-authored-by: Andy Feller <andyfeller@github.com>
This commit is contained in:
EBIBO 2024-08-18 09:25:30 +08:00 committed by GitHub
parent e269d43c5a
commit 04b4122e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -140,9 +140,8 @@ func FindRepoBranchID(client *Client, repo ghrepo.Interface, ref string) (string
if branchID == "" {
if ref != "" {
return "", "", fmt.Errorf("could not find branch %q in %s", ref, ghrepo.FullName(repo))
} else {
branchID = query.Repository.DefaultBranchRef.Target.Oid
}
branchID = query.Repository.DefaultBranchRef.Target.Oid
}
return query.Repository.Id, branchID, nil