<commit_before>(ns hu.ssh.github-changelog.github
  (:require
    [hu.ssh.github-changelog.util :as util]
    [hu.ssh.github-changelog.schema :refer [Config Pull]]
    [tentacles.core :refer [with-url]]
    [tentacles.pulls :as pulls]
    [schema.core :as s]))

(s/set-fn-validation! true)

(def pull-sha (partial util/value-at [:head :sha]))

(s/defn fetch-pulls :- [Pull]
  [config :- Config
   user :- s/Str
   repo :- s/Str]
  (with-url (:github-api config)
            (->> (pulls/pulls user repo (merge {:token (:token config), :all-pages true, :state "closed"}))
                 (map #(assoc % :sha (pull-sha %))))))
<commit_msg>removing an unnecessary threading macro<commit_after>(ns hu.ssh.github-changelog.github
  (:require
    [hu.ssh.github-changelog.util :as util]
    [hu.ssh.github-changelog.schema :refer [Config Pull]]
    [tentacles.core :refer [with-url]]
    [tentacles.pulls :as pulls]
    [schema.core :as s]))

(s/set-fn-validation! true)

(def pull-sha (partial util/value-at [:head :sha]))

(s/defn fetch-pulls :- [Pull]
  [config :- Config
   user :- s/Str
   repo :- s/Str]
  (let [options {:token (:token config), :all-pages true, :state "closed"}]
    (with-url (:github-api config)
              (map #(assoc % :sha (pull-sha %)) (pulls/pulls user repo options)))))

{'fraction_non_alphanumeric': 0.18090839107005388, 'fraction_numerical': 0.0, 'mean_word_length': 3.1139240506329116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2257360', 'n_tokens_mistral': 500, 'n_tokens_neox': 477, 'n_words': 114}