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.