From f22a0633d08e38ac4bf92b5165a708e11b4d6598 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 03 Oct 2012 17:31:37 -0400
Subject: [PATCH] Implemented support for toggling User.canFork in Manager

---
 groovy/jenkins.groovy |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/groovy/jenkins.groovy b/groovy/jenkins.groovy
index df4e588..d76a3d6 100644
--- a/groovy/jenkins.groovy
+++ b/groovy/jenkins.groovy
@@ -46,12 +46,17 @@
  * exception handler so it will not crash another script nor crash Gitblit.
  * 
  * Bound Variables:
- *  gitblit		Gitblit Server	 		com.gitblit.GitBlit
- *  repository	Gitblit Repository		com.gitblit.models.RepositoryModel
- *  user		Gitblit User			com.gitblit.models.UserModel
- *  commands	JGit commands 			Collection<org.eclipse.jgit.transport.ReceiveCommand>
- *	url			Base url for Gitblit	String
- *  logger		Logger instance			org.slf4j.Logger
+ *  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<org.eclipse.jgit.transport.ReceiveCommand>
+ *	url				Base url for Gitblit		String
+ *  logger			Logs messages to Gitblit 	org.slf4j.Logger
+ *  clientLogger	Logs messages to Git client	com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ *   def myCustomField = repository.customFields.myCustomField
  *  
  */
 // Indicate we have started the script
@@ -62,10 +67,10 @@
 
 // define your jenkins url here or set groovy.jenkinsServer in 
 // gitblit.properties or web.xml
-def jenkinsUrl = gitblit.getString("groovy.jenkinsServer", "http://yourserver/jenkins")
+def jenkinsUrl = gitblit.getString('groovy.jenkinsServer', 'http://yourserver/jenkins')
 
 // define the trigger url
-def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=" + url + "/git/" + repository.name
+def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=$url/git/$repository.name"
 
 // trigger the build
 new URL(triggerUrl).getContent()

--
Gitblit v1.9.1