gitlab api How to get Last Commit? logs_tree?

2019-09-05 01:21发布

gitlab api How to get Last Commit?

GET /projects/:id/repository/tree

{
    "name": "assets",
    "type": "tree",
    "mode": "040000",
    "id": "6229c43a7e16fcc7e95f923f8ddadb8281d9c6c6"
  },?

How to get logs_tree? Last Commit?

标签: gitlab
1条回答
甜甜的少女心
2楼-- · 2019-09-05 02:10

I would recommend follow the spec listed here which says that you can use
GET /projects/:id/repository/commits/tree
to return the following example data:

{
  "id": "6104942438c14ec7bd21c6cd5bd995272b3faff6",
  "short_id": "6104942438c",
  "title": "Sanitize for network graph",
  "author_name": "randx",
  "author_email": "dmitriy.zaporozhets@gmail.com",
  "created_at": "2012-09-20T09:06:12+03:00",
  "message": "Sanitize for network graph",
  "committed_date": "2012-09-20T09:06:12+03:00",
  "authored_date": "2012-09-20T09:06:12+03:00",
  "parent_ids": [
    "ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"
  ],
  "status": "running"
}

This is the latest commit. In terms of finding logs_tree the full documentation may help you

查看更多
登录 后发表回答