有人可以告诉我 - 哪里有办法使用 graphql api 获取特定存储库的所有提交和统计信息?
现在我以这样的查询结束:
query {
viewer {
repository(name: "CRM_system") {
ref(qualifiedName: "master") {
target {
... on Commit {
id
history(since: my_date_time) {
edges {
node {
messageHeadline
oid
message
author {
name
email
date
}
}
}
}
}
}
}
}
}
}
但它仅显示来自“master”的提交,并且根本不显示统计信息,我想看到类似于 github Rest api 的内容:
stats: {
total: 27
additions: 27
deletions: 0}
从支持人员处获取答案
https://platform.github.community/t/commit-stats-for-commits-in-repository/2193/4 https://platform.github.community/t/commit-stats-for-commits-in-repository/2193/4
通过最新的架构更改,您可以这样做:
query{
repository(owner:"education",name:"classroom"){
defaultBranchRef{
target{
... on Commit{
changedFiles
additions
deletions
}
}
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)