tree: 66dc496532970665fbd99c568387397f79d8690a [path history] [tgz]
  1. admin.ts
  2. annotation.ts
  3. attribute-helper.ts
  4. BUILD_for_publishing_api_only
  5. change-actions.ts
  6. change-reply.ts
  7. checks.ts
  8. core.ts
  9. diff.ts
  10. embed.ts
  11. event-helper.ts
  12. gerrit.ts
  13. hook.ts
  14. package-lock.json
  15. package.json
  16. plugin.ts
  17. popup.ts
  18. publish.sh
  19. README.md
  20. reporting.ts
  21. rest-api.ts
  22. rest.ts
  23. styles.ts
  24. suggestions.ts
  25. tsconfig.json
polygerrit-ui/app/api/README.md

Gerrit TypeScript Plugin API

This package contains the types for developing browser plugins for the Gerrit Code Review web application. General documentation for plugin developers can be found at gerrit-review.googlesource.com.

The .ts files only contain types, interfaces and enums, and thus the compiled .js files only contain the enums. For JavaScript plugins this package is not really useful or necessary, but it also serves as the source of truth for what plugin APIs are actually supported.

Versioning of this API matches the MAJOR and MINOR versions of the general Gerrit releases, but the PATCH version is independent. When you are building a plugin for Gerrit x.y.z, then you should use the API package x.y.n, where n is the highest available patch version of the API. Patch versions will only contain additions and fixes, minor versions may include API removals.

All types in here should use the declare keyword to prevent bundlers from renaming fields, which would break communication across separately built bundles. enums are the exception, because their keys are not referenced across bundles, and values will not be renamed by bundlers as they are strings.

This API is also used by other apps embedding gr-diff and any breaking changes should be discussed with the Gerrit core team and properly versioned.