Files
gerrit/Documentation/pg-plugin-project-api.txt
David Pursehouse b8f09bba8e Fix typo in pg-plugin-project-api.txt
Change-Id: Ic97d97a66d92088482eb448b54a89aa26d5bf5d8
2017-12-20 08:29:31 +00:00

37 lines
820 B
Plaintext

= Gerrit Code Review - Project admin customization API
This API is provided by link:pg-plugin-dev.html#plugin-project[plugin.project()]
and provides customization to admin page.
== createCommand
`projectApi.createCommand(title, checkVisibleCallback)`
Create a project command in the admin panel.
.Params
- *title* String title.
- *checkVisibleCallback* function to configure command visibility.
.Returns
- GrProjectApi for chaining.
`checkVisibleCallback(projectName, projectConfig)`
.Params
- *projectName* String project name.
- *projectConfig* Object REST API response for project config.
.Returns
- `false` to hide the command for the specific project.
== onTap
`projectApi.onTap(tapCalback)`
Add a command tap callback.
.Params
- *tapCallback* function that's excuted on command tap.
.Returns
- Nothing