+import com.atlassian.stash.hook.HookResponse
+import com.atlassian.stash.repository.RefChange
+import com.atlassian.stash.repository.Repository
+import groovyx.net.http.HTTPBuilder
+def hookResponse = hookResponse as HookResponse
+def refChanges = refChanges as Collection<RefChange>
+def repository = repository as Repository
+refChanges.each { refChange ->
+ if (refChange.ref.displayId in ["sample"]) {
+ def httpBuilder = new HTTPBuilder("http://jenkins:8080")
+ path: "/git/notifyCommit",
+ query: [url: "ssh://git@somewhere.com:7999",
+ branches: refChange.ref.displayId