Skip to content

[BUG]: Search query on github UI does not bring back the same result in octokit #736

Open
@mfrachet

Description

@mfrachet

What happened?

When running the following query in the Github search UI, it shows a list of 12 PRs.
When I run it in Octokit (v4.1.3 on node v22.14.0), it got an empty array

author:@me type:pr is:merged created:2025-05-07

Here is the exact code that I'm running.

  const twoDaysAgo = new Date();
  twoDaysAgo.setDate(twoDaysAgo.getDate() - 2);

  const date = twoDaysAgo.toISOString().split("T")[0];

  const response = await octokit.request(
    "GET /search/issues?advanced_search=true",
    {
      q: `type:pr is:merged author:@me created:${date}`,
      sort: "created",
      order: "desc",
      per_page: 100,
    }
  );

Am I missing something?

Thanks for your help and for this awesome lib 🙏🏻

Versions

Octokit v4.1.3 on Node v22.14.0

Relevant log output

An empty array while it should show 12 PRs

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    🔥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions