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
(require '[clj-http.client :as http]) | |
(require '[clojure.core.async :as a]) | |
(require '[clojure.string :as string]) | |
(require '[clojure.java.io :as io]) | |
(import '[java.io InputStream]) | |
(def event-mask (re-pattern (str "(?s).+?\r\n\r\n"))) | |
(defn- parse-event [raw-event] | |
(->> (re-seq #"(.*): (.*)\n?" raw-event) |
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
# create alias for cli gerrit requests | |
alias gerrit='ssh -p 29418 gerrit.yourdomain.com gerrit' | |
# get tempfile for the ids | |
tmpfileids=$(tempfile -d /tmp) | |
# get all commit number ids for the project YOUR_PROJECT_NAME | |
gerrit query 'status:open project:YOUR_PROJECT_NAME' | egrep '^\ +number' | cut -d' ' -f4- > $tmpfileids | |
# do mass abandon |