设置Github提交RSS订阅

124

我试图将我的GitHub提交记录转换为RSS源,但到目前为止我还没有成功。我知道可以使用以下语法获得私有源:

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

但这是用户的活动订阅。我想要一个我项目的提交订阅。

更新:这是最终语法:

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

但仍然无法查看所有分支上的提交记录。


1
要查看所有分支的提交记录,请尝试使用以下链接:https://github.com/:owner/:repo/commits.atom。问题在于你在示例中指定了一个特定的分支名称。 - Asiel Diaz Benitez
2个回答

171

您需要的是https://github.com/whatever/commits/master.atom,例如对于Cloudera flume 存储库,它是https://github.com/cloudera/flume/commits/master.atom


3
我想它遵循相同的模式。用你的仓库名称替换 whatever ,并在末尾加上 ?token=token。试一试这个方法。 - CanSpice
6
有没有一种方法可以获取项目标签的源?某些项目使用标签提供发布 tarballs。将其作为 RSS 源关注会很有用。 - TrinitronX
6
你可以用 "releases.atom" 替换 "commits/master.atom" 来获取发布版本信息。因此,对于上面的示例,它应该是 https://github.com/cloudera/flume/releases.atom。 - Erica
1
我认为私有仓库需要通过 Webhooks 进行操作。 - cynistersix
8
你也可以获取特定文件的历史记录数据源:https://github.com/whatever/commits/master/path/to/file.atom - Franklin Yu
显示剩余10条评论

20

除了 官方 Atom(第一部分)外,还有另一种选择,即使用 RssHub

Github 官方提供以下官方 RSS feed:

仓库发布: https://github.com/:owner/:repo/releases.atom

仓库提交: https://github.com/:owner/:repo/commits.atom

用户动态: https://github.com/:user.atom

私人动态: https://github.com/:user.private.atom?token=:secret (登录后在控制面板中可以找到订阅您的新闻源)


RssHub:

Github 仓库

示例: https://rsshub.app/github/repos/yanglr

路由: /github/repos/:user

参数:

  • 用户(必填): 用户名

Github 每日趋势(按语言分类)

示例: https://rsshub.app/github/trending/daily/javascript

路由: /github/trending/:since/:language?

参数:

  • Since(必需):时间跨度,可在趋势页面 URL中使用,可选每日和每月

  • Language(可选)

    语言,可在趋势页面 URL中找到

Github存储库问题

示例:https://rsshub.app/github/issue/DIYgod/RSSHub

路由:/github/issue/:user/:repo

参数:

  • User(必需):用户名

  • Repo(必需):存储库名称

Github存储库拉取请求

示例:https://rsshub.app/github/pull/DIYgod/RSSHub

路由:/github/pull/:user/:repo

参数:

  • User(必需):用户名

  • Repo(必需):存储库名称

Github用户

示例:https://rsshub.app/github/user/followers/yanglr

路由:/github/user/followers/:user

参数:

  • User(必需):用户名

Github仓库收藏数

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

路由:/github/stars/:user/:repo

参数:

  • User(必填):用户名

  • Repo(必填):仓库名

Github搜索结果

示例:https://rsshub.app/github/search/RSSHub/bestmatch/desc

路由:/github/search/:query/:sort?/:order?

参数:

  • Query(必填):搜索关键词

  • Sort(可选):排序选项(默认为bestmatch)

  • Order(可选):排序顺序,desc和asc(默认为desc降序)

enter image description here

此外,您可以使用Feed43为任何网页创建RSS源,无需登录帐户。官方教程请点击这里查看。


1
一个仓库的维基提交记录:https://github.com/:owner/:repo/wiki.atom - mrexodia

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接