Setting up a Github Commit RSS feed
Asked Answered
M

2

127

I am trying to have my github commits as an RSS feed but so far I have not managed to figure it out. I know that a private feed is available with the following syntax:

https://github.com/username.atom?token=token

But this the user's activity feed. I would like a commit feed of one of my projects.

Update: This was the final syntax:

https://github.com/username/repository_name/commits/branch_name.atom?login=login&token=token. 

Still can't view commits on all branches though.

Mcintosh answered 8/9, 2011 at 19:40 Comment(1)
to view commits on all branches try: https://github.com/:owner/:repo/commits.atom the issue is that you are giving an specific branch name in your exampleFrediafredie
C
173

You want https://github.com/whatever/commits/master.atom, like for the Cloudera flume repository it's https://github.com/cloudera/flume/commits/master.atom.

Centrobaric answered 8/9, 2011 at 19:45 Comment(15)
Thank you very much CanSpice. I forgot to mention it is a private repository. Could you please post that example? Also, is there a way for the rss to post from many branches?Mcintosh
I'd imagine that it follows the same pattern. Substitute your repository name for whatever and put ?token=token on the end. Give that a shot.Centrobaric
Thank you, I updated my question showing the final syntax. However i havent been able to view the commits on all branchesMcintosh
Did you try master.atom instead of branch_name.atom?Centrobaric
I did, it just gets the commits for my "master" branchMcintosh
Is there a way to get a feed of tags for a project? Certain projects use tags to provide release tarballs. It would be useful to follow these as an RSS feed.Distended
@Distended - You can replace commits/master.atom with releases.atom to get the releases. So for the example above, it would be github.com/cloudera/flume/releases.atom.Mercuri
I think private repos need to go through the webhooks.Lail
Please note, that Outlook 2010 x64 has issues reading RSS ATOM feeds. See answers.microsoft.com/en-us/office/forum/office_2010-outlook/….Mislay
@Lail may be correct, as I have just tested between a public and private repository at .../commits.atom. The public one returns an XML document with entries, while the private one simply responds with Not Found. Also noting that the private one is under an organization that I have access to. Tested through my web browser, so they are simply GET requests. I would be curious if anyone can provide more specific information about any WebHooks for GitHub repository RSS feeds.Cephalochordate
You can also get feed for history of a particular file: https://github.com/whatever/commits/master/path/to/file.atom.Melitamelitopol
@FranklinYu Thanks so much for this Franklin! Where did you get the doco for this? Or did you just figure it out yourself? Does anyone know if there's a way to modify that file commits url so the RSS would include the diff fragments instead of just the comment?Yamashita
@Yamashita I just figured out the URL myself, so I don't know how to show diff in feed. Sorry.Melitamelitopol
There's a a link to the commit as part of the Atom entry, so it's either one click away (or gesture in mobile app) - so I'm happy with how it is. Thanks again!Yamashita
@Centrobaric It is nice to see the answer helped many people. It does not address the Still can't view commits on all branches though. aspect of the question yet. Nor does it appear to show a feed of all commits in a repository. Instead, it shows (all) the commits in a specific branch of a repository (As pointed out by @jalagrange).Sylvester
L
23

There is another alternative RssHub except the official atoms (first part).

GitHub provides some official RSS feeds officially:

Repo releases: https://github.com/:owner/:repo/releases.atom

Repo commits: https://github.com/:owner/:repo/commits.atom

User activities: https://github.com/:user.atom

Private feed: https://github.com/:user.private.atom?token=:secret (You can find Subscribe to your news feed in dashboard page after login)


RssHub:

Github repositories

Example: https://rsshub.app/github/repos/yanglr

Routing: /github/repos/:user

parameters:

  • User(required): username

Github Trending by Language

Example: https://rsshub.app/github/trending/daily/javascript

Routing: /github/trending/:since/:language?

parameter:

  • Since (required): Time span, available in the Trending page URL, optional daily monthly

  • Language (optional)

    Language, which can be found in the Trending page URL

Github Repository Issues

Example: https://rsshub.app/github/issue/DIYgod/RSSHub

Routing: /github/issue/:user/:repo

parameter:

  • User (required ): username

  • Repo (required ): repository name

Github Repository Pull Requests

Example: https://rsshub.app/github/pull/DIYgod/RSSHub

Routing: /github/pull/:user/:repo

parameter:

  • User (required): username

  • Repo (required): repository name

Github User

Example: https://rsshub.app/github/user/followers/yanglr

Routing: /github/user/followers/:user

parameter:

  • User (required): username

Github Repository Stars

Example: https://rsshub.app/github/stars/yanglr/CaliburnMicro-Calculator

Routing: /github/stars/:user/:repo

parameter:

  • User (required): username

  • Repo (required): repository name

Github Search results

Example: https://rsshub.app/github/search/RSSHub/bestmatch/desc

Routing: /github/search/:query/:sort?/:order?

parameter:

  • Query (required): search keyword

  • Sort (optional): Sorting options (default is bestmatch)

  • Order (optional): Sort order, desc and asc (default desc descending)

enter image description here

Besides, you can use Feed43 to create feed for any web page if unnecessary to login with account. Official tutorial, click here to view.

Lavaliere answered 27/3, 2019 at 4:45 Comment(1)
Commits for a repository's wiki: https://github.com/:owner/:repo/wiki.atomTwitt

© 2022 - 2024 — McMap. All rights reserved.