GitLab Api 记录

1,449 阅读1分钟

1、鉴权的方法

1、创建个人令牌:https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
2、在请求header中添加 "PRIVATE-TOKEN: <your_access_token>"

2、获取Group下全部project

https://gitlab.xxx.com/api/v4/groups/${groupsId}/projects?per_page=100

3、获取project的commit信息

https://gitlab.xxxx.com//api/v4/projects/${id}/repository/commits