Add support for tag web links
Change-Id: If431ad869e53d97e1f479edaf24e17f3b9ecbda2
This commit is contained in:
		 Paladox none
					Paladox none
				
			
				
					committed by
					
						 David Pursehouse
						David Pursehouse
					
				
			
			
				
	
			
			
			 David Pursehouse
						David Pursehouse
					
				
			
						parent
						
							e067dc8af9
						
					
				
				
					commit
					433e1a9102
				
			| @@ -28,6 +28,7 @@ import com.google.gerrit.extensions.restapi.ResourceConflictException; | ||||
| import com.google.gerrit.extensions.restapi.RestApiException; | ||||
| import com.google.gerrit.extensions.restapi.RestModifyView; | ||||
| import com.google.gerrit.server.IdentifiedUser; | ||||
| import com.google.gerrit.server.WebLinks; | ||||
| import com.google.gerrit.server.extensions.events.GitReferenceUpdated; | ||||
| import com.google.gerrit.server.git.GitRepositoryManager; | ||||
| import com.google.gerrit.server.git.TagCache; | ||||
| @@ -60,6 +61,7 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> { | ||||
|   private final GitRepositoryManager repoManager; | ||||
|   private final TagCache tagCache; | ||||
|   private final GitReferenceUpdated referenceUpdated; | ||||
|   private final WebLinks links; | ||||
|   private String ref; | ||||
|  | ||||
|   @Inject | ||||
| @@ -68,11 +70,13 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> { | ||||
|       GitRepositoryManager repoManager, | ||||
|       TagCache tagCache, | ||||
|       GitReferenceUpdated referenceUpdated, | ||||
|       WebLinks webLinks, | ||||
|       @Assisted String ref) { | ||||
|     this.identifiedUser = identifiedUser; | ||||
|     this.repoManager = repoManager; | ||||
|     this.tagCache = tagCache; | ||||
|     this.referenceUpdated = referenceUpdated; | ||||
|     this.links = webLinks; | ||||
|     this.ref = ref; | ||||
|   } | ||||
|  | ||||
| @@ -134,7 +138,8 @@ public class CreateTag implements RestModifyView<ProjectResource, TagInput> { | ||||
|             result.getObjectId(), | ||||
|             identifiedUser.get().getAccount()); | ||||
|         try (RevWalk w = new RevWalk(repo)) { | ||||
|           return ListTags.createTagInfo(result, w, refControl); | ||||
|           ProjectControl pctl = resource.getControl(); | ||||
|           return ListTags.createTagInfo(result, w, refControl, pctl, links); | ||||
|         } | ||||
|       } | ||||
|     } catch (InvalidRevisionException e) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user