Gerrit API - 使用可选 WEB_LINKS 获取 CommitInfo - 查询语法

Gerrit API - get CommitInfo with optional WEB_LINKS - query syntax

我想为 Gerrit 创建一个 REST 查询,它将 return CommitInfo 实体但有一个可选字段包含所谓的 WEB_LINKS,即 "links to the commit in external sites as a list of WebLinkInfo entities."

这是查询获取 'standard' CommitIinfo 请求的方式(工作正常): https://<GERRIT_HOST>/a/projects/<PROJECT_NAME>/commits/<COMMIT_SHA>

根据文档 ( 1. https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#commit-info 2. https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#commit-info )

我写过这个:
https://<GERRIT_HOST>/a/projects/<PROJECT_NAME>/commits/<COMMIT_SHA>/?o=CURRENT_COMMIT&o=WEB_LINKS 但我收到 Er=400 客户端错误...

能否提供查询的正确语法?提前谢谢!

要获取 WEB_LINKS 信息,正确的方法是在命令末尾添加“?links”,但我认为此功能在 project "Get Commit" endpoint.[=14 中不可用=]

但是...

我能够使用 change "Get Commit" endpoint 获得此信息:

https://<GERRIT_HOST>/a/changes/<CHANGE_ID>/revisions/<COMMIT_SHA>/commit?links

例如:

https://<GERRIT_HOST>/a/changes/71135/revisions/c0d5d23ea05bf6e2011b453f1ee8c47a4da60821/commit?links