 2bd5c217d0
			
		
	
	2bd5c217d0
	
	
	
		
			
			This also includes backwards compatibility with the old /projects/ url. This only renames it for the admin interface. It does not rename it for changes or anything else. Bug: Issue 7754 Change-Id: Ia31d3f26871556729fb3c5b5b28ceca12da1ec7c
		
			
				
	
	
		
			37 lines
		
	
	
		
			784 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			784 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| = 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
 |