【问题标题】:How to get all the changes for a particular project, branch with start date and end date如何获取特定项目的所有更改,带有开始日期和结束日期的分支
【发布时间】:2020-10-20 00:27:24
【问题描述】:

我想使用给定的 Gerrit REST API 从 Gerrit 获取所有更改

  1. REPO 名称
  2. 分公司名称
  3. 开始日期 - 我想要审核的日期。
  4. 结束日期 - 我希望从开始日期开始的评论的日期。

到目前为止,我已经尝试过:

rest = GerritRestAPI(url=gerrit_url)
changes = rest.get('projects/{project name}')

但这给了我项目信息,但我想要更改。

我想要这样的东西

changes = rest.get('projects/{project name}/branch/{branchname}/startdate/{startdate}/enddate/{enddate}')

请帮帮我。

【问题讨论】:

    标签: python rest gerrit


    【解决方案1】:

    使用以下内容:

    changes = rest.get('changes/?q=project:{projectname}+branch:{branchnme}+after:{startdate}+before:{enddate}')
    

    【讨论】:

    • 如果我想获得每条评论的 cmets,我怎样才能使用这个命令我不想运行不同的命令 rest.get('changes/change-id/cmets')。
    • 您可以使用 rest.get('changes/{change-id}/cmets') 获取更改的所有修订版本的已发布 cmets 列表。
    猜你喜欢
    • 2020-10-05
    • 1970-01-01
    • 1970-01-01
    • 2021-09-14
    • 2019-04-23
    • 2020-12-08
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    相关资源
    最近更新 更多