此版本的 GitHub Enterprise 已停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持。
馈送
关于馈送 API
要查看哪些源可供您使用,请使用获取馈送操作。 然后,您可以通过向其中一个馈送 URL 发送请求来获取馈送。
获取 Atom 馈送的示例
要获取 Atom � �式的馈送,您必须在 Accept
� �头中指定 application/atom+xml
类型。 例如,要获取 GitHub 安全通告的 Atom 馈送:
curl -H "Accept: application/atom+xml" https://github.com/security-advisories
响应
HTTP/2 200
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
xml:lang="en-US">
<id>tag:github.com,2008:/security-advisories</id>
<link rel="self" type="application/atom+xml"
href="https://github.com/security-advisories.atom"/>
<title>GitHub Security Advisory Feed</title>
<author>
<name>GitHub</name>
</author>
<updated>2019-01-14T19:34:52Z</updated>
<entry>
<id>tag:github.com,2008:GHSA-abcd-12ab-23cd</id>
<published>2018-07-26T15:14:52Z</published>
<updated>2019-01-14T19:34:52Z</updated>
<title type="html">[GHSA-abcd-12ab-23cd] Moderate
severity vulnerability that affects Octoapp</title>
<category term="NPM"/>
<content type="html">
<p>Octoapp node module before 4.17.5 suffers
from a Modification of Assumed-Immutable Data (MAID)
vulnerability via defaultsDeep, merge, and mergeWith
functions, which allows a malicious user to modify
the prototype of "Object" via
<strong>proto</strong>, causing the
addition or modification of an existing property
that will exist on all objects.</p>
<p><strong>Affected Packages</strong></p>
<dl>
<dt>Octoapp</dt>
<dd>Ecosystem: npm</dd>
<dd>Severity: moderate</dd>
<dd>Versions: &lt; 4.17.5</dd>
<dd>Fixed in: 4.17.5</dd>
</dl>
<p><strong>References</strong></p>
<ul>
<li>https://nvd.nist.gov/vuln/detail/CVE-2018-123</li>
</ul>
</content>
</entry>
</feed>
Get feeds
使用 GitHub Apps
GitHub Enterprise Server provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
- Timeline: The GitHub Enterprise Server global public timeline
- User: The public timeline for any user, using URI template
- Current user public: The public timeline for the authenticated user
- Current user: The private timeline for the authenticated user
- Current user actor: The private timeline for activity created by the authenticated user
- Current user organizations: The private timeline for the organizations the authenticated user is a member of.
- Security advisories: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server.
Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
HTTP 响应状态代� �
状态代� � | 描述 |
---|---|
200 | OK |
代� �示例
get/feeds
curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token <TOKEN>" \
http(s)://HOSTNAME/api/v3/feeds
Response
Status: 200
{
"timeline_url": "https://github.com/timeline",
"user_url": "https://github.com/{user}",
"current_user_public_url": "https://github.com/octocat",
"current_user_url": "https://github.com/octocat.private?token=abc123",
"current_user_actor_url": "https://github.com/octocat.private.actor?token=abc123",
"current_user_organization_url": "",
"current_user_organization_urls": [
"https://github.com/organizations/github/octocat.private.atom?token=abc123"
],
"security_advisories_url": "https://github.com/security-advisories",
"_links": {
"timeline": {
"href": "https://github.com/timeline",
"type": "application/atom+xml"
},
"user": {
"href": "https://github.com/{user}",
"type": "application/atom+xml"
},
"current_user_public": {
"href": "https://github.com/octocat",
"type": "application/atom+xml"
},
"current_user": {
"href": "https://github.com/octocat.private?token=abc123",
"type": "application/atom+xml"
},
"current_user_actor": {
"href": "https://github.com/octocat.private.actor?token=abc123",
"type": "application/atom+xml"
},
"current_user_organization": {
"href": "",
"type": ""
},
"current_user_organizations": [
{
"href": "https://github.com/organizations/github/octocat.private.atom?token=abc123",
"type": "application/atom+xml"
}
]
}
}