Open cliffkoh opened 4 years ago
What happened?
Incorrect type for SearchIssuesAndPullRequestsResponseData (associated with RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]["data"]["items"])
SearchIssuesAndPullRequestsResponseData
RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]["data"]["items"]
What did you expect to happen?
Given the following minimal reproduction:
const { Octokit } = require("@octokit/rest"); async function run() { const octokit = new Octokit(); try { const searches = await octokit.search.issuesAndPullRequests({ q: "repo:test-organization-kkjeer/cliff-test+is:open" }); console.dir(searches); debugger; } catch (e) { debugger; console.dir(e); } } run();
The response includes "assignees" field while the type (see below) does not.
export interface SearchIssuesAndPullRequestsResponseData { total_count: number; incomplete_results: boolean; items: { url: string; repository_url: string; labels_url: string; comments_url: string; events_url: string; html_url: string; id: number; node_id: string; number: number; title: string; user: { login: string; id: number; node_id: string; avatar_url: string; gravatar_id: string; url: string; html_url: string; followers_url: string; following_url: string; gists_url: string; starred_url: string; subscriptions_url: string; organizations_url: string; repos_url: string; events_url: string; received_events_url: string; type: string; }; labels: { id: number; node_id: string; url: string; name: string; color: string; }[]; state: string; assignee: string; milestone: string; comments: number; created_at: string; updated_at: string; closed_at: string; pull_request: { html_url: string; diff_url: string; patch_url: string; }; body: string; score: number; }[]; }
Can you give more info?
I think all info is provcided
What happened?
Incorrect type for
SearchIssuesAndPullRequestsResponseData
(associated withRestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]["data"]["items"]
)What did you expect to happen?
Given the following minimal reproduction:
The response includes "assignees" field while the type (see below) does not.
Present buggy generated type (dist-types/generated/Endpoint.d.ts, @nodes/types@5.2.0):