disuser / office-ui-fabric-react

React components for building experiences for Office and Office 365.
https://developer.microsoft.com/en-us/fabric/#/components
Other
0 stars 0 forks source link

Missing response field #110

Open grvillic opened 4 years ago

grvillic commented 4 years ago

What happened? Incorrect type for SearchIssuesAndPullRequestsResponseData (associated with 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. image

Present buggy generated type (dist-types/generated/Endpoint.d.ts, @nodes/types@5.2.0):

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;
    }[];
}
annaowens commented 4 years ago

Can you give more info?

grvillic commented 4 years ago

The property is no longer included in the response, when it used to 2 days ago using the same request.