diff options
Diffstat (limited to 'Documentation/pg-plugin-repo-api.txt')
-rw-r--r-- | Documentation/pg-plugin-repo-api.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Documentation/pg-plugin-repo-api.txt b/Documentation/pg-plugin-repo-api.txt new file mode 100644 index 0000000000..1272ea6869 --- /dev/null +++ b/Documentation/pg-plugin-repo-api.txt @@ -0,0 +1,36 @@ += Gerrit Code Review - Repo admin customization API + +This API is provided by link:pg-plugin-dev.html#plugin-repo[plugin.repo()] +and provides customization to admin page. + +== createCommand +`repoApi.createCommand(title, checkVisibleCallback)` + +Create a repo command in the admin panel. + +.Params +- *title* String title. +- *checkVisibleCallback* function to configure command visibility. + +.Returns +- GrRepoApi for chaining. + +`checkVisibleCallback(repoName, repoConfig)` + +.Params +- *repoName* String project name. +- *repoConfig* Object REST API response for repo config. + +.Returns +- `false` to hide the command for the specific project. + +== onTap +`repoApi.onTap(tapCalback)` + +Add a command tap callback. + +.Params +- *tapCallback* function that's excuted on command tap. + +.Returns +- Nothing |