当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Extracting information of GIT repositories

问题描述:

I'm trying to extract information from "plain" git (remote) repositories.

Consider https://github.com/jquery/jquery. You can find there information like:

tjvantoll authored Friday at 10:13 PM

timmywil committed Monday at 10:43 PM

build Release: ensure Sizzle is the latest tag 12 days ago

src Wrap: Declare a dependency on the manipulation module 2 days ago

test Ajax: Support usage without jQuery.event 2 days ago

[...]

I need information like these, but from a git repository, not from github only. Can I use JGit, REST, JSON or something else, to be able to get these information and parse them for author, url, date, etc?

Are there methods like getAuthor(), getLastCommit(), getDate(), etc?

网友答案:

You can look at https://developer.github.com/v3/repos/commits/ for JSON - it returns all the commits

分享给朋友:
您可能感兴趣的文章:
随机阅读: