From a502d96a860456ec5e8c96761db70f7cabb74751 Mon Sep 17 00:00:00 2001 From: Paul Martin <paul@paulsputer.com> Date: Sat, 30 Apr 2016 04:19:14 -0400 Subject: [PATCH] Merge pull request #1073 from gitblit/1062-DocEditorUpdates --- src/main/java/com/gitblit/utils/RpcUtils.java | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 46 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/gitblit/utils/RpcUtils.java b/src/main/java/com/gitblit/utils/RpcUtils.java index 24e07dc..8220215 100644 --- a/src/main/java/com/gitblit/utils/RpcUtils.java +++ b/src/main/java/com/gitblit/utils/RpcUtils.java @@ -203,7 +203,21 @@ } - /** + /** + * Create a fork of a repository. + * + * @param repository + + * @return true if the action succeeded + * @throws IOException + */ + public static boolean forkRepository(RepositoryModel repository, String serverUrl, + String account, char[] password) throws IOException { + return doAction(RpcRequest.FORK_REPOSITORY, repository.name, null, serverUrl, account, password); + } + + + /** * Send a revised version of the repository model to the Gitblit server. * * @param repository @@ -252,6 +266,37 @@ } /** + * Reindex all tickets on the Gitblit server. + * + * @param serverUrl + * @param account + * @param password + * @return true if the action succeeded + * @throws IOException + */ + public static boolean reindexTickets(String serverUrl, String account, + char[] password) throws IOException { + return doAction(RpcRequest.REINDEX_TICKETS, null, null, serverUrl, account, + password); + } + + /** + * Reindex tickets for the specified repository on the Gitblit server. + * + * @param serverUrl + * @param repositoryName + * @param account + * @param password + * @return true if the action succeeded + * @throws IOException + */ + public static boolean reindexTickets(String serverUrl, String repositoryName, + String account, char[] password) throws IOException { + return doAction(RpcRequest.REINDEX_TICKETS, repositoryName, null, serverUrl, + account, password); + } + + /** * Create a user on the Gitblit server. * * @param user -- Gitblit v1.9.1