Remove redundant nil check in IssueNodeID

GraphQL already returns an error when the repository or issue does not
exist, making the empty-ID check unreachable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kynan Ware 2026-05-06 15:52:21 -06:00
parent e3ce7e5225
commit 469438ebc5

View file

@ -642,8 +642,5 @@ func IssueNodeID(client *Client, repo ghrepo.Interface, number int) (string, err
if err != nil {
return "", err
}
if result.Repository.Issue.ID == "" {
return "", fmt.Errorf("issue #%d not found in %s", number, ghrepo.FullName(repo))
}
return result.Repository.Issue.ID, nil
}