kokodyn
kokodyn

Reputation: 329

How to get Gerrit detail from change-id existing in different projects?

I would like to get change detail from change_id assume 123 Using GERRIT API: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail

But In such a case it throws error:

HTTP Error 404: Not Found !! CODE=404 !! None -> b'Multiple changes found for 123\n' @ http://<GERRIT_SERVER>/a/changes/123/detail

The problem is that there are changes with same change_id in multiple projects. Same command works properly when I try to get detail for change_id which exists only in single project.

Do you know some workaround for such a case?

Upvotes: 0

Views: 1087

Answers (1)

Add the project to the search.

See the Gerrit documentation here.

{change-id}

Identifier that uniquely identifies one change. It contains the URL-encoded project name as well as the change number: "'~'"

Gerrit also supports the following identifiers:

  • an ID of the change in the format "'~~'", where for the branch the refs/heads/ prefix can be omitted ("myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940")
  • a Change-Id if it uniquely identifies one change ("I8473b95934b5732ac55d26311a706c9c2bde9940")
  • a numeric change ID ("4247")

Upvotes: 1

Related Questions