如何在GitHub上找到存储库项目的创建日期? [英] How to find the created date of a repository project on GitHub?

查看:286
本文介绍了如何在GitHub上找到存储库项目的创建日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在GitHub上找到项目的创建日期?

How can I find the created date of a project on GitHub?

基本上,我必须找到第一个提交才能看到创建的日期,但是,有些项目有500个提交,这浪费了很多时间试图进入第一个提交页面.

Basically, I have to find the first commit to see the created date, however, some projects have 500 commits, which wastes a lot of time trying to get to the first commit page.

是否有更快的方法来获取创建的日期?

Is there a quicker way to get the created date?

推荐答案

如何知道GitHub上项目的创建日期.

how to know the created date of a project on GitHub.

使用 Repos GitHub API 进行检索信息

Use the Repos GitHub API to retrieve this information

  • 语法:https://api.github.com/repos/{:owner}/{:repository}
  • 示例: https://api.github.com/repos/libgit2/libgit2sharp
  • Syntax: https://api.github.com/repos/{:owner}/{:repository}
  • Example: https://api.github.com/repos/libgit2/libgit2sharp

JSON有效负载将使用创建存储库的UTC日期公开created_at成员.

The JSON payload will expose a created_at member with the UTC date the repository was created.

考虑上面的 LibGit2Sharp 存储库,您可以看到它已创建在2011年2月2日世界标准时间16:44:49.

Considering the LibGit2Sharp repository above, one can see that it's been created on Feb, 2nd 2011 at 16:44:49 UTC.

注意:created_at不一定反映第一次提交的日期.这是在GitHub上创建存储库的日期.例如,xunit/resharper-xunit项目最近是

Note: The created_at won't necessarily reflect the date of the first commit. It's the date the repository has been created on GitHub. For instance, the xunit/resharper-xunit project was recently moved from codeplex to GitHub. The created_at date is 2014-05-01T11:17:56Z, but the most of the commits date back much more farther than that.

这篇关于如何在GitHub上找到存储库项目的创建日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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