设置 Github Commit RSS 提要
Posted
技术标签:
【中文标题】设置 Github Commit RSS 提要【英文标题】:Setting up a Github Commit RSS feed 【发布时间】:2011-11-13 06:57:32 【问题描述】:我正在尝试将我的 github 提交作为 RSS 提要,但到目前为止我还没有设法弄清楚。我知道可以使用以下语法提供私人供稿:
https://github.com/username.atom?token=token
但这是用户的活动提要。我想要我的一个项目的提交提要。
更新:这是最终的语法:
https://github.com/username/repository_name/commits/branch_name.atom?login=login&token=token.
但仍然无法查看所有分支上的提交。
【问题讨论】:
查看所有分支上的提交尝试:https://github.com/:owner/:repo/commits.atom
问题是您在示例中给出了特定的分支名称
【参考方案1】:
你想要https://github.com/whatever/commits/master.atom
,就像Cloudera flume repository 它是https://github.com/cloudera/flume/commits/master.atom
。
【讨论】:
我想它遵循相同的模式。将您的存储库名称替换为whatever
并将 ?token=token
放在末尾。试一试。
你试过master.atom
而不是branch_name.atom
吗?
有没有办法获取项目的标签提要?某些项目使用标签来提供发布 tarball。将这些作为 RSS 提要进行跟踪会很有用。
@TrinitronX - 您可以将 commits/master.atom 替换为 release.atom 以获取版本。所以对于上面的例子,它将是github.com/cloudera/flume/releases.atom。
您还可以获取特定文件历史记录的提要:https://github.com/whatever/commits/master/path/to/file.atom
。【参考方案2】:
除了official atoms(第一部分)之外,还有另一种选择RssHub。
GitHub 官方提供了一些官方的 RSS 提要:
回购发布: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?
参数:
自(必填):时间跨度,在Trending page URL 中提供,可选每天每月
语言(可选)
语言,可在Trending page URL 中找到
Github 存储库问题
示例:https://rsshub.app/github/issue/DIYgod/RSSHub
路由:/github/issue/:user/:repo
参数:
用户(必填):用户名
Repo(必需):存储库名称
Github 存储库拉取请求
示例:https://rsshub.app/github/pull/DIYgod/RSSHub
路由:/github/pull/:user/:repo
参数:
用户(必填):用户名
Repo(必需):存储库名称
Github 用户
示例:https://rsshub.app/github/user/followers/yanglr
路由:/github/user/followers/:user
参数:
用户(必填):用户名Github 存储库之星
例如:https://rsshub.app/github/stars/yanglr/CaliburnMicro-Calculator
路由:/github/stars/:user/:repo
参数:
用户(必填):用户名
Repo(必需):存储库名称
Github 搜索结果
示例:https://rsshub.app/github/search/RSSHub/bestmatch/desc
路由:/github/search/:query/:sort?/:order?
参数:
查询(必填):搜索关键字
排序(可选):排序选项(默认为最佳匹配)
Order(可选):排序顺序,desc 和 asc(默认 desc 降序)
此外,如果不需要使用帐户登录,您可以使用Feed43 为任何网页创建提要。官方教程,点击here查看。
【讨论】:
以上是关于设置 Github Commit RSS 提要的主要内容,如果未能解决你的问题,请参考以下文章
Github Dashboard-Feed 通过 API 或 RSS?