使用 github api 获取文件的最后提交日期

Get last commit date of a file with github api

正常GET /repos/:owner/:repo/contents/:path不包含任何关于日期的信息。

编辑:

  1. 要查找特定文件的日期,请看这里 - https://api.github.com/repos/:owner/:repo/commits?path=PATH_TO_FILE

您可以在此处看到提交日期,即文件上传到 git 的日期。

  1. 检查此路径 - https://api.github.com/repos/:owner/:repo/commits

在里面你可以看到提交日期和提交的文件