gitlab api如何获取最后提交? logs_tree? [英] gitlab api How to get Last Commit? logs_tree?

查看:73
本文介绍了gitlab api如何获取最后提交? logs_tree?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gitlab api如何获取上次提交?

gitlab api How to get Last Commit?

GET /projects/:id/repository/tree

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

如何获取logs_tree?上次提交?

How to get logs_tree? Last Commit?

推荐答案

我建议遵循

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"
}

这是最新的提交.在查找logs_tree方面,完整的文档可能对您有帮助

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

这篇关于gitlab api如何获取最后提交? logs_tree?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆