Resolve changes by project and number in AddReviewers

When a new change is pushed and change indexing runs asynchronously
(`index.indexChangesAsync = true`), the `reviewers` plugin immediately
runs `AddReviewers` to assign reviewers from `reviewers.config`. Because
`AddReviewers` looks up the change by change number alone
(`gApi.changes().id(changeInfo._number)`), Gerrit has to query the
change index to find which project the change belongs to. On Patchset 1,
if background indexing has not finished yet, the lookup fails with
`ResourceNotFoundException` and no reviewers are added.

Pass both the project name and change number
(`gApi.changes().id(changeInfo.project, changeInfo._number)`) in
`AddReviewers` so Gerrit reads the change directly from primary storage
(NoteDb) instead of querying the change index. This follows the
deprecation of `Changes#id(int)` in favor of `Changes#id(String, int)`
(see I7ddde61db, I0ccd90cf6, and I305ff2d2c).

Change-Id: Ia2df288f0a82fc3adec6712695e2cbe55a07b7ae
2 files changed
tree: b575e98516ac75fa5620aca8999b67d630bb2b18
  1. .settings/
  2. src/
  3. web/
  4. .gitignore
  5. BUILD
  6. eslint.config.js
  7. LICENSE
  8. package-lock.json
  9. package.json