문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top