122

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.

tripleee
  • 175,061
  • 34
  • 275
  • 318
jalagrange
  • 2,291
  • 2
  • 19
  • 24
  • 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 example – Asiel Diaz Benitez Nov 09 '21 at 19:43

2 Answers2

168

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.

CanSpice
  • 34,814
  • 10
  • 72
  • 86
  • 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? – jalagrange Sep 08 '11 at 19:47
  • 3
    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. – CanSpice Sep 08 '11 at 19:52
  • Thank you, I updated my question showing the final syntax. However i havent been able to view the commits on all branches – jalagrange Sep 08 '11 at 20:02
  • 1
    Did you try `master.atom` instead of `branch_name.atom`? – CanSpice Sep 08 '11 at 20:20
  • 1
    I did, it just gets the commits for my "master" branch – jalagrange Sep 08 '11 at 20:41
  • 6
    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. – TrinitronX Oct 31 '11 at 18:50
  • 6
    @TrinitronX - You can replace commits/master.atom with releases.atom to get the releases. So for the example above, it would be https://github.com/cloudera/flume/releases.atom. – Erica Aug 23 '13 at 08:20
  • 1
    I think private repos need to go through the webhooks. – cynistersix Apr 25 '14 at 21:21
  • Please note, that Outlook 2010 x64 has issues reading RSS ATOM feeds. See http://answers.microsoft.com/en-us/office/forum/office_2010-outlook/cannot-add-atom-rss-feed-in-outlook-2010-x64-bit/329645c4-fd91-4f56-b222-bf527b3b3da9?auth=1. – lubosdz Jun 20 '16 at 08:03
  • 1
    @cynistersix 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. – Pysis Aug 12 '17 at 06:33
  • 8
    You can also get feed for history of a particular file: `https://github.com/whatever/commits/master/path/to/file.atom`. – Franklin Yu Mar 23 '18 at 15:58
  • @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? – Shorn Apr 10 '18 at 10:22
  • @Shorn I just figured out the URL myself, so I don't know how to show diff in feed. Sorry. – Franklin Yu Apr 10 '18 at 17:46
  • 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! – Shorn Apr 10 '18 at 22:36
  • @CanSpice 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). – a.t. Feb 28 '22 at 15:37
20

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.

Phani Rithvij
  • 4,030
  • 3
  • 25
  • 60
Bravo Yeung
  • 8,654
  • 5
  • 38
  • 45