gerrit获取个人or所有热的comment的分支or个数
2024年1月29日大约 2 分钟约 676 字
个人需求:
需求:怎么获取gerrit中个人comment的change
方法一:界面search
status:merged commentby:self reviewedby:selfstatus:merged commentby:selfcommentby:'USER'
Changes containing a top-level or inline comment by 'USER'. The special case of commentby:self will find changes where the caller has commented.
方法二:上面的方法查找不全面,使用ssh
ssh -p <port> username@gerrit_server gerrit --help命令再用--help可以查询使用方式,比如
ssh -p <port> username@gerrit_server gerrit query --help查询相关的comment
ssh -p 29418 luxing3@10.11.92.87 gerrit QUERY commentsssh -p 29418 username@gerritip gerrit query --help
gerrit query QUERY ... [--] [--all-approvals] [--all-reviewers] [--comments] [--commit-message] [--current-patch-set] [--dependencies] [--files] [--format FMT] [--help (-h)] [--patch-sets] [--start (-S) N] [--submit-records]
QUERY : Query to execute
-- : end of options
--all-approvals : Include information about all patch sets and approvals
--all-reviewers : Include all reviewers
--comments : Include patch set and inline comments
--commit-message : Include the full commit message for a change
--current-patch-set : Include information about current patch set
--dependencies : Include depends-on and needed-by information
--files : Include file list on patch sets
--format FMT : Output display format
--help (-h) : display this help text
--patch-sets : Include information about all patch sets
--start (-S) N : Number of changes to skip
--submit-records : Include submit and label status其他部分相关参数:
age:'AGE'
可查询给定时间之前的change信息,如 age:1d 即为查询1天前的所有change信息,以change的最后更新时间为基准
s, sec, second, seconds
m, min, minute, minutes
h, hr, hour, hours
d, day, days (1 day is treated as 24 hours)
w, week, weeks (1 week is treated as 7 days)
mon, month, months (1 month is treated as 30 days)
y, year, years (1 year is treated as 365 days)
change:'ID'
查询指定change-id的change信息
conflicts:'ID'
查询指定conflicts-id的change信息
owner:'USER', o:'USER'
查询指定owner的change信息
ownerin:'GROUP'
查询指定group人员提交的change信息
reviewer:'USER', r:'USER'
查询指定审核人员的change信息
reviewerin:'GROUP'
查询指定group人员审核的change信息
commit:'SHA1'
Changes where 'SHA1' is one of the patch sets of the change.
project:'PROJECT', p:'PROJECT'
查询指定项目下的change信息
projects:'xx'
查询项目名以xx开头的所有项目的chage信息
parentproject:'PROJECT'
查询指定项目及其子项目的change信息
branch:'BRANCH'
查询指定分支的change信息
topic:'TOPIC'
查询指定topic的change信息,常与‘branch’,‘project’连用
ref:'xxx'
查询目标分支与 xxx匹配的change信息
tr:'ID', bug:'ID'
查询提交信息中包含‘bug’的change信息
message:'MESSAGE'
查询提交信息包含‘MESSAGE’的change信息
comment:'TEXT'
查询comment信息包含指定字符串的 change信息
status:xxx
查询指定状态的change