Skip to content

Commit

Permalink
Add workaround for Gerrit error "Multiple changes found"
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Oct 26, 2022
1 parent 750e9e5 commit d67f8d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion reviewrot/gerritstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,16 @@ def format_response(self, decoded_responses, age, show_last_comment):
self.url, str(decoded_response["id"])
)

comments_response = self._call_api(comments_request_url)
try:
comments_response = self._call_api(comments_request_url)
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
log.warning(
"Reviews with multiple changes are unsupported; got error: %s",
e.response.text,
)
continue
raise

last_comment = self.get_last_comment(comments_response)

Expand Down

0 comments on commit d67f8d3

Please sign in to comment.