-5

I have a website where I want to show the user the date of when it was last updated. (to show the data on the site is updated)
Since I use Netlify to show the main branch on my GitHub repo, I was hoping to show the lastest commit date to the main branch.

I want it to say "Last updated {latest GitHub commit}"

How do I make this work with javascript? I am new to coding, so I would need as much info on how to use the API as possible. Thank you.

I found this, but I don't know how to extrapolate the data I need from it. https://api.github.com/repos/:owner/:repo/branches/master

torek
  • 389,216
  • 48
  • 524
  • 664
  • https://stackoverflow.com/questions/29845346/how-to-get-latest-commit-date-github-api – Yarin_007 May 22 '22 at 23:37
  • 5
    Please research your inquiry before posting. Duplicate questions aren't permitted in the interest of content quality. This is a duplicate of [How to get latest commit date - Github API](https://stackoverflow.com/questions/29845346/how-to-get-latest-commit-date-github-api) – esqew May 23 '22 at 00:46

0 Answers0