gitlab api获取用户星标项目

获取所有项目

复制代码
gitlab_url: gitlab的地址
token: 管理员账号的access_token
https://gitlab_url/api/v4/projects/?private_token=token&page=1&per_page=20

注:该链接只获取一页的数据,可通过循环累加page遍历所有项目

获取某个用户的星标项目

参考连接:https://docs.gitlab.cn/jh/api/projects.html#列出用户加星标的项目

复制代码
gitlab_url: gitlab的地址
ueser_id: 用户的id
token: 该用户的access_token
https://gitlab_url/api/v4/users/user_id/starred_projects?private_token=token&page=1&per_page=20
注:该链接只获取一页的数据,可通过循环累加page遍历所有项目

获取项目的所有分支

复制代码
gitlab_url: gitlab的地址
token: 用户的access_token
https://gitlab_url/api/v4/projects/project_id/repository/branches?private_token=token&page=1&per_page=20

注:该链接只获取一页的数据,可通过循环累加page遍历所有项目
相关推荐
力江11 小时前
GitLab 私有化部署实战 —— 从 Omnibus 到 Docker 的踩坑之旅
docker·容器·gitlab
极小狐5 天前
从 GitLab Flow 到 Pipeline:分支策略 + CI/CD + 运维一文打通
ci/cd·gitlab·devops·极狐gitlab
猫头虎5 天前
GitHub 入门教程:如何加入并为开源项目贡献代码
gitee·开源·gitlab·github·开放原子·开源协议·gitcode
悠然南风7 天前
【云原生学习】Prometheus监控、GitLab与Jenkins部署实战
kubernetes·gitlab
极小狐9 天前
极狐GitLab Runner 自托管安全加固指南
安全·ci/cd·gitlab·devops·runner·安全加固
钝挫力PROGRAMER10 天前
Windows Docker 环境搭建 GitLab CI/CD 流水线
windows·docker·gitlab·gitlab-runner
我一定会有钱15 天前
打造完美工作流:Git 配置”一次推送,三端同步”(Gitee/GitCode/GitHub)
开发语言·windows·vscode·搜索引擎·gitlab·github·visual studio code
LXY_BUAA16 天前
Git_在飞牛中部署 GitLab_20260817
git·gitlab
Jeanyia18 天前
GitLab 配套 Git 常用命令
git·gitlab