如何通过推送日期来限制组织的存储库?

时间:2017-04-05 01:55:07

标签: github github-api graphql

这是一个GitHub GraphQL查询:

query Foo($login:String!) {
  repositoryOwner(login: $login){
    repositories(first: 3){
      totalCount,
      nodes{
        name
        pushedAt
      }
    }
  }
}

有没有办法修改此查询,以便返回的结果已被pushedAt日期过滤(限制)? pushedAt存在于节点上,我可以获取它,但我想只获得某个日期pushedAt的组织存储库的子集。我希望能够将结果限制为pushedAt日期,而不是对其进行排序。谢谢。

1 个答案:

答案 0 :(得分:0)

这是一个解决方案:

{
  search(first: 3, type: REPOSITORY, query: "user:MyOrg pushed:>2017-04-01T06:00:00Z") {
    edges {
      node {
        ... on Repository{
          name
          pushedAt
        }
      }
    }
    repositoryCount
  }
}
相关问题