GraphQL - 如何在给定提交后获取所有提交?
GraphQL - How to get all the commits after a given commit?
在 Github v4 API 中有没有办法在给定提交后获取所有提交?
我试过了,但没有任何结果。
{
repository(owner: "karthikeayan", name: "puhar-petti") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(last: 100, before: "d1b7ccc044be72490525a3fe1b819440f4927cba 0") {
pageInfo {
startCursor
endCursor
}
edges {
node {
oid
messageHeadline
messageBody
}
}
}
}
}
}
}
}
使用 git 日志我可以通过
git log d1b7ccc044be72490525a3fe1b819440f4927cba..HEAD
在我的实验中,before 游标被忽略。
在 v4 中,您可以按页面向前搜索,如此 query.graphql 要点。
history(first: 100, after: "d1b7ccc044be72490525a3fe1b819440f4927cba 0") {
...
}
在 v3 中,您可以使用正在预览的 Search Commits API。但是,它只搜索默认分支。
在 Github v4 API 中有没有办法在给定提交后获取所有提交?
我试过了,但没有任何结果。
{
repository(owner: "karthikeayan", name: "puhar-petti") {
ref(qualifiedName: "master") {
target {
... on Commit {
history(last: 100, before: "d1b7ccc044be72490525a3fe1b819440f4927cba 0") {
pageInfo {
startCursor
endCursor
}
edges {
node {
oid
messageHeadline
messageBody
}
}
}
}
}
}
}
}
使用 git 日志我可以通过
git log d1b7ccc044be72490525a3fe1b819440f4927cba..HEAD
在我的实验中,before 游标被忽略。
在 v4 中,您可以按页面向前搜索,如此 query.graphql 要点。
history(first: 100, after: "d1b7ccc044be72490525a3fe1b819440f4927cba 0") {
...
}
在 v3 中,您可以使用正在预览的 Search Commits API。但是,它只搜索默认分支。