Google Source Repositories API文件列表
我可以通过Google API客户端访问https://cloud.google.com/source-repositories/docs/reference/rest/,而没有任何问题,但是我正在寻找一种获取文件列表的方法。如果无法通过REST客户端使用此功能,是否应该使用纯git命令以我的Oauth2令牌作为访问权限来执行此操作?
现在我有
const response = await gapi.client.sourcerepo.projects.repos.list({
名称:projects/${project.projectId}
});
返回漂亮列表
{
"repos": [
{
"name": "projects/ajonp-hugofire/repos/ajonp-hugofire",
"url": "https://source.developers.google.com/p/ajonp-hugofire/r/ajonp-hugofire"
},
{
"name": "projects/ajonp-hugofire/repos/ajonp-hugofire-app",
"url": "https://source.developers.google.com/p/ajonp-hugofire/r/ajonp-hugofire-app"
},
{
"name": "projects/ajonp-hugofire/repos/ajonp-hugofire-app-angular",
"url": "https://source.developers.google.com/p/ajonp-hugofire/r/ajonp-hugofire-app-angular"
},
{
"name": "projects/ajonp-hugofire/repos/ajonp-hugofire-app-beta-angular",
"url": "https://source.developers.google.com/p/ajonp-hugofire/r/ajonp-hugofire-app-beta-angular"
}
]
}
我也可以使用其中的一个来呼叫
const response = await gapi.client.sourcerepo.projects.repos.get({
name: repo.name
});
仅返回大小/网址
{
"name": "projects/ajonp-hugofire/repos/ajonp-hugofire",
"size": "22169",
"url": "https://source.developers.google.com/p/ajonp-hugofire/r/ajonp-hugofire"
}
我想看到的是另一个电话,说要获取要回购的文件?废弃的API可能与这有关,而他们仍在努力吗?
我想看到的是另一个电话,说要获取要回购的文件?废弃的API可能与这有关,而他们仍在努力吗?
我希望有类似的东西
gapi.client.sourcerepo.repo.files()