在github api中可以获得一个文件的提交历史记录吗? [英] Is it possible to get commits history for one file in github api?

查看:398
本文介绍了在github api中可以获得一个文件的提交历史记录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在github REST api中获取所有提交的单独文件的消息。但我得到的只是为了获得所有提交单独的分支。然后我试图得到以下结果:

  http://api.github.com/users/<username>/<项目> /提交/<分支> /<路径/到/文件> 

但是这也没有帮助。这是至少可能的吗?

解决方案

试试这个(如API文档 here ):

http://api.github.com/repos/:owner/ :repo / commits?path = PATH_TO_FILE



例如

https://api.github.com/repos/izuzak/pmrpc/commits?path=README。降价


I would like to get all commit messages for separate file in github REST api. But all I got - only to get all commits for separate branch. Then I tried to get following:

http://api.github.com/users/<username>/<project>/commits/<branch>/<path/to/file>

But that didn't help also. Is this at least possible?

解决方案

Try this (as described in the API docs here):

http://api.github.com/repos/:owner/:repo/commits?path=PATH_TO_FILE

e.g.

https://api.github.com/repos/izuzak/pmrpc/commits?path=README.markdown

这篇关于在github api中可以获得一个文件的提交历史记录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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