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:
parent
e3ce7e5225
commit
469438ebc5
1 changed files with 0 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue