gpt4 book ai didi

gerrit - 将变更编号转换为变更 ID

转载 作者:行者123 更新时间:2023-12-01 12:47:19 25 4
gpt4 key购买 nike

是否有 gerrit REST API 可以将更改编号转换为更改 ID

例如:https://android-review.googlesource.com/#/c/23823/

将 23823 转换为 I4f39e8d8cc22520cd36f83f8675a716cc1ade1d9

谢谢。

最佳答案

使用“更改”端点来搜索更改号码。例如:

curl -s --request GET --user user https://gerrit-server/a/changes/?q=change:32151

)]}'
[
{
"id": "code~master~I64f1c892c13a9bad903955678f104c34f36d1079",
"project": "code",
"branch": "master",
"hashtags": [],
"change_id": "I64f1c892c13a9bad903955678f104c34f36d1079",
"subject": "This is an example",
"status": "MERGED",
"created": "2016-11-03 19:15:36.000000000",
"updated": "2016-11-03 23:02:53.475000000",
"submittable": false,
"insertions": 80,
"deletions": 29,
"_number": 32151,
"owner": {
"_account_id": 3
}
}
]

然后获取“change_id”信息。例如:

curl -s --request GET --user user https://gerrit-server/a/changes/?q=change:32151 | sed 1d | jq --raw-output ".[] | .change_id"

I64f1c892c13a9bad903955678f104c34f36d1079

更多信息here .

关于gerrit - 将变更编号转换为变更 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40420034/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com