Created
December 13, 2012 23:39
-
-
Save paultag/4281134 to your computer and use it in GitHub Desktop.
Test Clojure dput-ng hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Copyright (c) Paul R. Tagliamonte <[email protected]>, 2012, under the | |
; terms of dput-ng it's self. | |
(ns clojtest | |
(:require dput.core | |
dput.exceptions)) | |
(defn log [x] ; for debug output | |
(.debug dput.core/logger x)) | |
(defn dput-checker [changes profile interface] | |
(cond (>= (-> changes (.get "maintainer") (.find "[email protected]")) 0) | |
(throw (dput.exceptions/HookException. "Maintainer's Arno. Aborting upload")) | |
:else | |
(log "Nah, it's not arno, we're good"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment