From: James Moger Date: Fri, 14 Sep 2012 13:36:46 +0000 (-0400) Subject: Expose ReceivePack to Groovy hooks (issue 125) X-Git-Tag: v1.2.0~231 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6bb3b233c8a73d4fe4e5024794029fdc75a9f1bb;p=gitblit.git Expose ReceivePack to Groovy hooks (issue 125) --- diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index fd112d56..0ef571ce 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -19,6 +19,7 @@ If you are updating from an earlier release AND you have indexed branches with t #### changes +- Expose ReceivePack to Groovy push hooks (issue 125) - Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129) - Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126) - LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list. diff --git a/groovy/blockpush.groovy b/groovy/blockpush.groovy index d0e2c2e0..caef3306 100644 --- a/groovy/blockpush.groovy +++ b/groovy/blockpush.groovy @@ -53,6 +53,7 @@ import com.gitblit.utils.ClientLogger * Bound Variables: * gitblit Gitblit Server com.gitblit.GitBlit * repository Gitblit Repository com.gitblit.models.RepositoryModel + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack * user Gitblit User com.gitblit.models.UserModel * commands JGit commands Collection * url Base url for Gitblit String diff --git a/groovy/jenkins.groovy b/groovy/jenkins.groovy index 73360581..d76a3d66 100644 --- a/groovy/jenkins.groovy +++ b/groovy/jenkins.groovy @@ -48,6 +48,7 @@ import org.slf4j.Logger * Bound Variables: * gitblit Gitblit Server com.gitblit.GitBlit * repository Gitblit Repository com.gitblit.models.RepositoryModel + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack * user Gitblit User com.gitblit.models.UserModel * commands JGit commands Collection * url Base url for Gitblit String diff --git a/groovy/localclone.groovy b/groovy/localclone.groovy index 11868d71..49b7f8b3 100644 --- a/groovy/localclone.groovy +++ b/groovy/localclone.groovy @@ -58,6 +58,7 @@ import org.slf4j.Logger * Bound Variables: * gitblit Gitblit Server com.gitblit.GitBlit * repository Gitblit Repository com.gitblit.models.RepositoryModel + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack * user Gitblit User com.gitblit.models.UserModel * commands JGit commands Collection * url Base url for Gitblit String diff --git a/groovy/protect-refs.groovy b/groovy/protect-refs.groovy index f730bcb2..b1b611f4 100644 --- a/groovy/protect-refs.groovy +++ b/groovy/protect-refs.groovy @@ -59,6 +59,7 @@ import org.slf4j.Logger * Bound Variables: * gitblit Gitblit Server com.gitblit.GitBlit * repository Gitblit Repository com.gitblit.models.RepositoryModel + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack * user Gitblit User com.gitblit.models.UserModel * commands JGit commands Collection * url Base url for Gitblit String diff --git a/groovy/sendmail.groovy b/groovy/sendmail.groovy index f3fe0fab..c832bc64 100644 --- a/groovy/sendmail.groovy +++ b/groovy/sendmail.groovy @@ -54,6 +54,7 @@ import org.slf4j.Logger * Bound Variables: * gitblit Gitblit Server com.gitblit.GitBlit * repository Gitblit Repository com.gitblit.models.RepositoryModel + * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack * user Gitblit User com.gitblit.models.UserModel * commands JGit commands Collection * url Base url for Gitblit String diff --git a/src/com/gitblit/GitServlet.java b/src/com/gitblit/GitServlet.java index d81703d0..2571693d 100644 --- a/src/com/gitblit/GitServlet.java +++ b/src/com/gitblit/GitServlet.java @@ -249,6 +249,7 @@ public class GitServlet extends org.eclipse.jgit.http.server.GitServlet { Binding binding = new Binding(); binding.setVariable("gitblit", GitBlit.self()); binding.setVariable("repository", repository); + binding.setVariable("receivePack", rp); binding.setVariable("user", user); binding.setVariable("commands", commands); binding.setVariable("url", gitblitUrl);