githubfeedliverevisions

How to show a feed of Github revisions that updates automatically?


I'm wondering how you could make a feed on your website that shows all revisions in a Github project. Basically something like this: https://oc.tc/revisions is what I'm looking for. I couldn't find the scripts/programs they use anywhere sadly.

Any help is appreciated,

Martin.


Solution

  • There is two ways to do that. You can either use the GitHub API for Commits, which responds with JSON, or you can simply take the Atom feed of the repo. Each repo has an feed with the commits, the Feed URL looks this way:

    https://github.com/[Username]/[Repository]/commits/[Branch].atom
    

    For just displaying the "revision", using the feed will be a quite straightforward solution. Using the API offers you more options, though.