看来Gerrit和REST API的Web界面显示了不同的评论结果。
例如,来自Android Gerrit审阅实例的Change I78c787fd5dd09fc7700f3093341532fe23f20eb8显示Dima Zavin投了+2 (LGTM, approved)
。
Android实例的默认值为
-2: Do not submit
-1: I would prefer that you didn't submit this
0: No score
+1: Looks good to me, but someone else must approve
+2: Looks good to me, approved
但是,REST API完全不返回+2
,仅返回+1
:
curl "https://android-review.googlesource.com/changes/?q=change:I78c787fd5dd09fc7700f3093341532fe23f20eb8&o=DETAILED_LABELS"
有趣的是,此URL似乎有效:
curl "https://android-review.googlesource.com/changes/I78c787fd5dd09fc7700f3093341532fe23f20eb8/detail"
怎么了?
答案 0 :(得分:1)
原来是一个bug in the Gerrit后端。
答案 1 :(得分:0)
您需要在卷曲URL中添加引号:
curl "https://android-review.googlesource.com/changes/?q=change:I78c787fd5dd09fc7700f3093341532fe23f20eb8&o=DETAILED_LABELS"