Open avm99963 opened 8 months ago
I mailed a PR with my suggestion in case we find it useful: https://github.com/sdefresne/gerrit-monitor/pull/53
I tested the change by running http-server -p 8081
in the folder I attach compressed (which simulates a Gerrit server with this issue) and adding http://localhost:8081
to the extension options.
My Gerrit server is answering API requests to
/changes/
with some changes which have therevisions
property empty:This is due to an incomplete/incorrect index, since I just restarted my Gerrit instance and I guess I did it at the worst time. Running
gerrit index changes {ID}
to reindex the changes affected by this fixed the issue.When this error occurs, the popup doesn't show any CLs but instead shows the following error:
TypeError: Cannot read properties of undefined (reading 'commit')
. The error occurs here:https://github.com/sdefresne/gerrit-monitor/blob/5d72c67de692ea484491936085d21278d29deb89/src/gerrit.js#L337-L346
Maybe we can consider returning
null
if there aren't any revisions? And then in the CL widget, we could show the subject as a fallback if the description isnull
.