nichijou
nichijou

Reputation: 514

Get last commit date of a file with github api

The normal GET /repos/:owner/:repo/contents/:path doesn't contain any information about date.

Upvotes: 6

Views: 4048

Answers (1)

Tal Folkman
Tal Folkman

Reputation: 2571

Edit:

  1. In order to find the date of specific file look here - https://api.github.com/repos/:owner/:repo/commits?path=PATH_TO_FILE

you can see here the date of the commit which is the date when the file uploaded to git.

  1. check this path - https://api.github.com/repos/:owner/:repo/commits

inside you can see both commit date and the files of the commit

enter image description here

Upvotes: 1

Related Questions