如何通过 MergeableState 在 Graphql GitHub API 中进行过滤
以下代码块返回拉取请求列表及其可合并状态,例如“可合并”、“冲突”等。
有没有办法通过 mergeablestate?
我可以使用js或其他任何东西过滤此后获得的结果。我想了解如何在 Graphql 脚本中执行此操作。查了文档没找到方法。
{
repository(owner: "rikesh_kamra", name: "git-sticker") {
pullRequests(first: 1, states: [OPEN]) {
nodes {
id
number
changedFiles
deletions
mergeable
author {
url
}
}
}
}
}
我尝试过
pullRequests(first: 1, states: [OPEN], mergeable: [MERGEABLE))
,但收到错误消息,指出 mergeable 不是 pullRequests 的有效参数。
The following code block returns a list of pull requests with their mergeability status such as 'MERGEABLE', 'CONFLICTING', etc.
Is there any way to filter inline by mergeablestate?
I can filter the result obtained after this using js or anything else. I wanted to understand how to do it in a Graphql script. Looked up the docs could not find a way.
{
repository(owner: "rikesh_kamra", name: "git-sticker") {
pullRequests(first: 1, states: [OPEN]) {
nodes {
id
number
changedFiles
deletions
mergeable
author {
url
}
}
}
}
}
I tried
pullRequests(first: 1, states: [OPEN], mergeable: [MERGEABLE))
But got an error saying mergeable is not a valid argument for pullRequests.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论