Extend CommitMessageFetcher to handle non-commit objects
CommitMessageFetcher expected to fetch for commit objects and failed
for non-commit objects.
With the advent of NoteDB, RefUpdatedEvents sometimes contain
non-commit objects. For example `refs/sequences/changes` typically
references a blob. When this ref gets updated, Gerrit sends a
corresponding RefUpdatedEvent with blobs as oldRev and newRev, which
used to trip up CommitMessageFetcher.
To avoid issues, we extend CommitMessageFetcher to work on ids of
Add Mockito dependency for executing the associated unit-tests.
Bug: Issue 10686
(cherry picked from commit 59135736c5bba8b432a81bcc1722576a66563f11)
4 files changed