Using Commit Search API on forks

Hello. I believe, based on experimentation, that the Commit Search API does not support forks and am wondering if this is by design or a bug.

Examples:

# Getting commits from a non-fork repository.
$ curl -H "Accept: application/vnd.github.cloak-preview" "https://api.github.com/search/commits?q=repo:rust-lang-nursery/rustfmt+author:davidalber"
{
  "total_count": 90,
  "incomplete_results": false,
  "items": [
    .
    .
    .
  ]
}

# Getting commits from a fork of the repository above.
$ curl -H "Accept: application/vnd.github.cloak-preview" "https://api.github.com/search/commits?q=repo:davidalber/rustfmt+author:davidalber"
{
  "total_count": 0,
  "incomplete_results": false,
  "items": [

  ]
}

Some of the other search API endpoints support a fork argument. I thought trying that might work, but it did not.

$ curl -H "Accept: application/vnd.github.cloak-preview" "https://api.github.com/search/commits?q=repo:davidalber/rustfmt+author:davidalber+fork:true"
{
  "total_count": 0,
  "incomplete_results": false,
  "items": [

  ]
}

Is there a way to get the commit search to work in a fork?

Thanks!

Hi @davidalber,

For this question, it might actually be best for you to reach out to us via private support. We can do a little bit deeper dive that way and connect you with some our experts on this topic.

Cheers!