clojars / clojars-web

A community repository for open-source Clojure libraries
https://clojars.org
Eclipse Public License 1.0
468 stars 114 forks source link

Verify io VCS groups instead of net #865

Closed tobias closed 1 year ago

tobias commented 1 year ago

This was a mistake introduced with self-verification; we should have always verified the io domains.

See #864.

tobias commented 1 year ago

Code I used to verify io groups for net groups:

(ns clojars.tools.fix-io-verifications
  (:require
   [clojure.java.jdbc :as jdbc]
   [clojars.db :as db]))

(defn get-net-verifications
  [db]
  (jdbc/query db
              ["select * from group_verifications where group_name like 'net.github.%' or group_name like 'net.gitlab.%'"]
              {}))

(defn run
  [db]
  (doseq [{:keys [group_name verified_by]} (get-net-verifications db)
          :let [io-group (str "io" (subs group_name 3))]]
    (printf "verifying %s from %s for %s\n" io-group group_name verified_by)
    (db/add-group db verified_by io-group)
    (db/verify-group! db verified_by io-group)))

This verified 29 new groups.