是否有通过项目ID搜索GitLab项目的方法?
谢谢。
发布于 2021-12-17 11:24:48
可以通过请求/projects/:id
端点:https://docs.gitlab.com/ee/api/projects.html#get-single-project来获得单个项目
例如:
curl https://gitlab.com/api/v4/projects/278964
响应将包含name
、ssh_url_to_repo
、http_url_to_repo
、web_url
等:
{
"id": 3,
"description": null,
"default_branch": "master",
"visibility": "private",
"ssh_url_to_repo": "git@example.com:diaspora/diaspora-project-site.git",
"http_url_to_repo": "http://example.com/diaspora/diaspora-project-site.git",
"web_url": "http://example.com/diaspora/diaspora-project-site",
"readme_url": "http://example.com/diaspora/diaspora-project-site/blob/master/README.md",
"tag_list": [ //deprecated, use `topics` instead
"example",
"disapora project"
],
"topics": [
"example",
"disapora project"
],
"owner": {
"id": 3,
"name": "Diaspora",
"created_at": "2013-09-30T13:46:02Z"
},
"name": "Diaspora Project Site",
"name_with_namespace": "Diaspora / Diaspora Project Site",
"path": "diaspora-project-site",
"path_with_namespace": "diaspora/diaspora-project-site",
"issues_enabled": true,
...
https://stackoverflow.com/questions/70391964
复制相似问题