fd1985ac56
Add plugin.project() docs, placeholders for other methods, minor cleanup. Change-Id: I7307a0ec6be6f920c58582b6f619db00de2249b3
37 lines
821 B
Plaintext
37 lines
821 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 chainging.
|
|
|
|
`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
|